I’ve tried everything I could find, I can’t figure it out.
All I’m trying to do is to instantiate a sprite onto my scene.
I can see the clones popping up but nothing shows. where are they, are they hidden in levels, position out of sight, alpha channel…i dont know. Do you guys know why my instances would be invisible?
GameObject CloneThing= (GameObject)Instantiate (OriginalThing) as GameObject;
You should be able to double click the object in the Hierarchy to have it find it. If you don’t see it and it’s a sprite using the sprite renderer, check alpha, object size, that sort of thing. Also, make sure it’s not hiding behind other sprites.
If it’s an image(which also uses a sprite) then it has to be a child of a canves.
Got it after i SetParent to canvas.
But it’s super strange…or rather, it’s not user friendly. I had to set the canvas to world space and then adjust the sprite scale to 0.03 and fiddle around with stuff like that. as a new user, these things are tricky.
World space puts the canves into your scene. Like if you wanted a dialogue box above a characters head. Overlay and camera are used for more for UI type stuff.
Try not to mess around with child scales to make them look good in world space as that’s a good way to drive you insane. The canvas scaler can decide to behave differently if you changed the resolution, aspect ratio, and so on. For example, the canvas scale can change to 0.009 if you use screen-space camera under certain conditions.