Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Prefab with a canvas

$
0
0
Well, I want to make a slider that stay above a object in game.

I created a Canvas (Render Mode: World Space) with a Slider and put it as child of my gameobject (Enemy).
This works well, despite I need to freez its rotation by script..

Then, I save it as a prefab. But when I instantiate this prefab the slider appear in localPosition (0,0,0) and not above the Enemy. Am I doing something wrong?

OBS: I'm using unity 2D

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>