- Home /
How can I determine if property was set to 'None (Audio Clip)'
Hi to All,
I have a MonoBehaviour class attached to to a gameObject. The class has an AudioClip public member variable which is visible in inspector:
public AudioClip TestAC;
In the inspector it set to 'None (Audio Clip)'. I am trying to check in the Start if there is a valid AudioClip provided, and if not I would like to set a default clip.
Suprisingly checking the TestAC variable against null results false.
How can I determine if my TestAC variabe was set to 'None (Audio Clip)' in inspector? (using C# code)?
Thx for answers
-cc
Your answer
Follow this Question
Related Questions
Can i extend or customise editor for all MonoBehaviours? 3 Answers
Large serializable field in a MonoBehaviour causing poor performance in Inspector 1 Answer
Prevent 'Paste Component Values' on MonoBehaviour 1 Answer
Custom Inspector: Accessing a reference to another MonoBehaviour? 1 Answer
Unity inspector scripting - scriptable objects - card game 0 Answers