I've copied an animation in order to make it R/W, added the component script below to the GameObject, then created an Animation Event. However, I cannot select my function (MeshState) from the list. It does not appear on the list. The list is empty.
![alt text][1]
// MeshHider.cs
using UnityEngine;
using System.Collections;
public class MeshHider : MonoBehaviour {
public Renderer meshSelection;
public bool meshHidden;
public void MeshState(bool meshHidden){
if( meshHidden == true)
{
meshSelection.renderer.enabled = false;
}
else
{
meshSelection.renderer.enabled = true;
}
}
}
[1]: /storage/temp/28380-animation+event+-+edit+animation+event+-+no+function+selected.jpg
↧