I’m looking to use a single animation to animate multiple objects
Error is underlined at with error code : The Type of namespace HO1could not be found, which is clearly alocated and linked in-game.
[SerializeField]
public Image Heart2;
[SerializeField]
public Animation HO1;
void Start()
{
Heart2.GetComponent<HO1>().Play();
ResetQuestion();
}
I’m sure Unity is smarter than this, and i’m just missing out on something.
Thanks guys, i couldn’t find a matching issue anywhere else.
if you want to play the animation on the GameObject Hearth2 reference
or…
GetComponent<Animation>().Play();
If you want to play HO1 from this GameObject
Forgot to mention i'm a beginner, and i might ask some stupid questions ... Your response seems to return no errors when i replaced Heart2.GetComponent().Play(); with Heart2.GetComponent().Play(); But now i don't understand how to link the "Animation" to the component, and now what would be the point of naming a animation if i won't be using it anyway. For instance i want to play Animation"HO1" won the image Heart2 How would that look like in code ?
in scene view window, top left corner change "shaded" to "Shadowmask". look at how see how large the black and white squares are on your floor. If they are too big, the resolution of lightmap will be terribly low. To increase the number of squares, select your floor, go into mesh renderer and increase "scale in lightmap" to a higher number
found the answer myself, but the problem gets a bit more complicated … i’d like to animate the object the animation is attached to … any quick solution for this ?
Yes, you would think the lightmapping is the problem but i dont think so in this case. See screenshots: ![alt text][1] ![alt text][2] the first one shows the BAKED GI - SHADOWMASK and the second one REALTIME GI - ALBEDO the square is emitting realtime light. the problem is there.. see: ![alt text][3] [1]: /storage/temp/99881-screen-shot-2017-08-14-at-84319-am.png [2]: /storage/temp/99882-screen-shot-2017-08-14-at-84113-am.png [3]: /storage/temp/99883-screen-shot-2017-08-14-at-84559-am.png Thanks for the help!
Forgot to mention i'm a beginner, and i might ask some stupid questions ... Your response seems to return no errors when i replaced Heart2.GetComponent().Play(); with Heart2.GetComponent().Play(); But now i don't understand how to link the "Animation" to the component, and now what would be the point of naming a animation if i won't be using it anyway. For instance i want to play Animation"HO1" won the image Heart2 How would that look like in code ?
– Swegfanin scene view window, top left corner change "shaded" to "Shadowmask". look at how see how large the black and white squares are on your floor. If they are too big, the resolution of lightmap will be terribly low. To increase the number of squares, select your floor, go into mesh renderer and increase "scale in lightmap" to a higher number
– IgorAherne