- Home /
Exclude Variable from Add Property in Animation window
Hello!
Does anyone know if their is a way to hide a variable inside the AddProperty menu of the Animation tab, but NOT in the inspector? Perhaps an attribute like [NotKeyable]
Inspector:
Animation window:
[HideInInspector] seems to do the opposite of what I want.
To give a bunch of extra context.
I'm trying to allow a shader property to be set on the material, or animated if the user wants to.
Normally you can just access the material properties directly through the animation tab when using a MeshRenderer or LineRenderer. However using the UI Extension script "UILIneRenderer" that is not an option.
So my solution was to add a script that sets these values every frame using material.setfloat(). The problem with this is, if the user isn't using any animation, they are set to the default values every frame. So I added a booleans to turn this feature on and off.
if( boolean )
{
material.setfloat();
}
In order to show these Boolean in the inspector, I have made them [Serialized Field], but now they are showing up in the add property tab of the animation window, which I don't really want.
I know this is probably not a huge deal. I'm just trying to make things as good as they can be! Also, I've only been scripting for a year or so, so I'm open to the idea that I might be doing this in a weird way!
Thanks for any help you can give!
Your answer
Follow this Question
Related Questions
How to Serialize an AnimationState 0 Answers
Parameterized Animation Clip 0 Answers
Animation editor Issue and a weird disappearing bug 1 Answer
Animation Help Needed (Method Not Found) 2 Answers
mecanim stuck 0 Answers