- Home /
Question by
elhongo · Jul 23, 2016 at 09:59 PM ·
objectpublic variableobject referenceobject-reference-errorunityengine.object
Is it possible to define a public variable of type UnityEngine.Object?
I was wondering if it is possible to create a public variable of type UnityEngine.Object.
I am trying to create a class that has a public variable where I can assign a video file(mp4) by dragging and dropping the file into the variable slot in editor. I then get the name of the Object and then use the name to play the video using a video playing asset.
This seems to work fine in the editor but when I build the project, the UnityEngine.Object that is received as a public variable is always null.
Any ideas why?
Comment
Your answer
Follow this Question
Related Questions
Object reference not set error 1 Answer
Object reference exists but also doesn't? 1 Answer
How do I fix this error 0 Answers
split object when player touches anywhere in the screen 1 Answer