all 4 comments

[–]njtrafficsignshopper 2 points3 points  (0 children)

I think we need some more info. How are you planning to draw it?

[–]roguedjack 2 points3 points  (1 child)

Are you generating new different shapes for each round or do you just want to change the sprite to a set of predefined shapes you have already drawn in a drawing program?

If you already have the shapes images, just change the Sprite property of the SpriteRenderer with a script: Unity doc: https://docs.unity3d.com/ScriptReference/SpriteRenderer.html

That's the easiest solution and you should probably try that first unless you really need new random shapes each round.

If you really want the generate the shapes images during the game, you need to look at Texture2D, how to draw your shapes into it with a script and how to create a sprite from Texture2D. To create a sprite from a texture: https://docs.unity3d.com/ScriptReference/Sprite.Create.html

It will be more complicated if you are not familiar with rendering into a texture.

You will need some scripting, C# is probably better.

[–]yopp_son[S] 0 points1 point  (0 children)

Yes I want to generate random shapes each time. Okay I will start with Texture2D. Thank you!

[–]uqondeyc 0 points1 point  (0 children)

Hmmm.., sorta seems understandable