Reply To: How to Export to Prefab with right GameObject reference?

Slate Forums Support How to Export to Prefab with right GameObject reference? Reply To: How to Export to Prefab with right GameObject reference?

#1107
Gavalakis
Keymaster

Hello,

Thanks for explanation.
Ideally, the cutscene is better to NOT be a prefab since it is entirely a scene based object and relates to scene objects as well.
Alternatively, if you do have a prefab cutscene and instantiate it in runtime and want to re-assign Actor GameObjects as required, you can use the cutscene function called “SetGroupActorOfName(string groupName, GameObject newActor)”. For this to work better, you will of course have to name your Actor Groups in the inspector (by selecting the group) so that you can easily use this function better.

This reference limitation is generally speaking how Unity works, in that asset objects (like a prefab) can’t have references to scene objects.
With that said, I am already looking at finding a way to easier handle this situation, probably by automatically fetching the object by specified name if a reference is missing.

Thank you!

Join us on Discord: https://discord.gg/97q2Rjh