void ScriptPrefabUtility::internal_UpdateFromPrefab(ScriptSceneObject* soPtr) { if (ScriptSceneObject::checkIfDestroyed(soPtr)) return; HSceneObject so = soPtr->getNativeSceneObject(); HSceneObject prefabParent = so->getPrefabParent(); if(prefabParent != nullptr) PrefabUtility::updateFromPrefab(prefabParent); }
MonoObject* ScriptPrefabUtility::internal_getPrefabParent(ScriptSceneObject* nativeInstance) { if (ScriptSceneObject::checkIfDestroyed(nativeInstance)) return nullptr; HSceneObject so = nativeInstance->getNativeSceneObject(); HSceneObject parent = so->getPrefabParent(); if(parent != nullptr) { ScriptSceneObject* scriptParent = ScriptGameObjectManager::instance().getOrCreateScriptSceneObject(parent); return scriptParent->getManagedInstance(); } return nullptr; }