|
@@ -57,6 +57,20 @@ namespace BansheeEditor
|
|
|
Internal_RevertPrefab(objPtr);
|
|
Internal_RevertPrefab(objPtr);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Updates all of the objects belonging to the same prefab instance as the provided object (if any). The update
|
|
|
|
|
+ /// will apply any changes from the linked prefab to the hierarchy(if any).
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ /// <param name="obj"></param>
|
|
|
|
|
+ public static void UpdateFromPrefab(SceneObject obj)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (obj == null)
|
|
|
|
|
+ return;
|
|
|
|
|
+
|
|
|
|
|
+ IntPtr objPtr = obj.GetCachedPtr();
|
|
|
|
|
+ Internal_UpdateFromPrefab(objPtr);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// Checks if a scene object has a prefab link. Scene objects with a prefab link will be automatically updated
|
|
/// Checks if a scene object has a prefab link. Scene objects with a prefab link will be automatically updated
|
|
|
/// when their prefab changes in order to reflect its changes.
|
|
/// when their prefab changes in order to reflect its changes.
|
|
@@ -112,6 +126,9 @@ namespace BansheeEditor
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
private static extern bool Internal_HasPrefabLink(IntPtr nativeInstance);
|
|
private static extern bool Internal_HasPrefabLink(IntPtr nativeInstance);
|
|
|
|
|
|
|
|
|
|
+ [MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
|
|
+ private static extern void Internal_UpdateFromPrefab(IntPtr nativeInstance);
|
|
|
|
|
+
|
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
|
private static extern SceneObject Internal_GetPrefabParent(IntPtr nativeInstance);
|
|
private static extern SceneObject Internal_GetPrefabParent(IntPtr nativeInstance);
|
|
|
|
|
|