How to redraw a texture on a prefab instance when a property in the inspector is changed by the developer?
I am building an SDK for augmented reality glasses and we want to allow users (other Unity developers) to build scenes with fiducial markers based on our marker design and id system.
We have the math and code to draw any marker design based on the id of that marker. I want to provide a prefab of a marker a Unity developer can use in a scene to help define their augmented scene. When this prefab has it's id property changed in the inspector I'd like to call a function behind the scenes to re-draw the actual texture you see on that marker in the Scene editor. This way the Unity developer may select various marker's they like, or marker's with ids that make sense fo their application and have a preview of them in the augmented scene. (This would effectively hide at application run time).
I am wondering what the best way of approaching this is.
Thank you for your time!
Have you tried $$anonymous$$onoBehaviour.OnValidate ?
http://docs.unity3d.com/ScriptReference/$$anonymous$$onoBehaviour.OnValidate.html
Your answer
Follow this Question
Related Questions
Project turns "read only" after a while 0 Answers
Why did inspector fields get cleared with new Unity Hub version 0 Answers
how can edit builtin shader in inspector to see source code? 1 Answer
Is it possible to make a unity plane whose curvature can be controlled at run time? 0 Answers
Resources.unload on scriptable object resets it's prefab references 0 Answers