#Inactive cameras don't run component script

1 messages · Page 1 of 1 (latest)

wraith harbor
#

I currently have a camera register script attached to each of my cameras that register them with my camera manager. However, unless I am misunderstanding something, this requires me to have the cameras active when loaded into the scene which I find really really annoying. I'd like to be able to load in a scene, have the cameras be inactive but still registered and I can enable/disable them I desire. Any thoughts/suggestions on how I could do this?

stuck current
#

you can disable the camera component without deactivating the whole object, so your own script should still run

wraith harbor
#

Ok. I just coded a test and that seems to work, which is great!!! But there seems to be one issue. I'd like to get your opinions on best practices here because I know I can hack a fix but don't want to take the wrong approach. Currently I attach my scene volumes to my cameras when I need to not run from the global one. Maybe this is bad practice? It just spared me having have a volume controller and for my project they always go together camera/volume and I thought it would be better performance enabling both camera/volume together. Anyway, now that keeping the entire object active it keeps using my "MainCamera" volume and I THINK is completely ignoring my "SecondaryCamera" volume which has effects I need to have running. I guess I could have my camera manager enable/disable set both the camera and volume components as active/enactive...it is only doing the camera component right now. Any thoughts you would be willing to share?