当前位置: 首页>>代码示例>>C#>>正文


C# SceneObject.GetCachedPtr方法代码示例

本文整理汇总了C#中SceneObject.GetCachedPtr方法的典型用法代码示例。如果您正苦于以下问题:C# SceneObject.GetCachedPtr方法的具体用法?C# SceneObject.GetCachedPtr怎么用?C# SceneObject.GetCachedPtr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SceneObject的用法示例。


在下文中一共展示了SceneObject.GetCachedPtr方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CloneSO

        /// <summary>
        /// Creates new a scene object by cloning an existing object.
        /// </summary>
        /// <param name="so">Scene object to clone.</param>
        /// <param name="description">Optional description of what exactly the command does.</param>
        /// <returns>Cloned scene object.</returns>
        public static SceneObject CloneSO(SceneObject so, string description = "")
        {
            if (so != null)
                return Internal_CloneSO(so.GetCachedPtr(), description);

            return null;
        }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:13,代码来源:UndoRedo.cs

示例2: NativeRigidbody

        public NativeRigidbody(SceneObject linkedSO)
        {
            IntPtr linkedSOPtr = IntPtr.Zero;
            if (linkedSO != null)
                linkedSOPtr = linkedSO.GetCachedPtr();

            Internal_CreateInstance(this, linkedSOPtr);
        }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:8,代码来源:NativeRigidbody.cs

示例3: NativeRenderable

        public NativeRenderable(SceneObject sceneObject)
        {
            IntPtr sceneObjPtr = IntPtr.Zero;
            if (sceneObject != null)
                sceneObjPtr = sceneObject.GetCachedPtr();

            Internal_Create(this, sceneObjPtr);
        }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:8,代码来源:NativeRenderable.cs

示例4: IsPrefabInstance

        /// <summary>
        /// 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.
        /// </summary>
        /// <param name="obj">Scene object to check if it has a prefab link.</param>
        /// <returns>True if the object is a prefab instance (has a prefab link), false otherwise.</returns>
        public static bool IsPrefabInstance(SceneObject obj)
        {
            if (obj == null)
                return false;

            IntPtr objPtr = obj.GetCachedPtr();
            return Internal_HasPrefabLink(objPtr);
        }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:14,代码来源:PrefabUtility.cs

示例5: GetPrefabParent

        /// <summary>
        /// Returns the root object of the prefab instance that this object belongs to, if any. 
        /// </summary>
        /// <param name="obj">Scene object to retrieve the prefab parent for.</param>
        /// <returns>Prefab parent of the provided object, or null if the object is not part of a prefab instance.</returns>
        public static SceneObject GetPrefabParent(SceneObject obj)
        {
            if (obj == null)
                return null;

            IntPtr objPtr = obj.GetCachedPtr();
            return Internal_GetPrefabParent(objPtr);
        }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:13,代码来源:PrefabUtility.cs

示例6: BreakPrefab

        /// <summary>
        /// Breaks the link between a prefab instance and its prefab. Object will retain all current values but will
        /// no longer be influenced by modifications to its parent prefab.
        /// </summary>
        /// <param name="obj">Prefab instance whose link to break.</param>
        public static void BreakPrefab(SceneObject obj)
        {
            if (obj == null)
                return;

            IntPtr objPtr = obj.GetCachedPtr();
            Internal_BreakPrefab(objPtr);
        }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:13,代码来源:PrefabUtility.cs

示例7: SerializedSceneObject

        /// <summary>
        /// Records the current state of the provided scene object.
        /// </summary>
        /// <param name="so">Scene object to record the state for.</param>
        /// <param name="hierarchy">If true, state will be recorded for the scene object and all of its children. Otherwise
        ///                         the state will only be recorded for the provided scene object.</param>
        public SerializedSceneObject(SceneObject so, bool hierarchy)
        {
            IntPtr soPtr = IntPtr.Zero;
            if (so != null)
                soPtr = so.GetCachedPtr();

            Internal_CreateInstance(this, soPtr, hierarchy);
        }
开发者ID:BearishSun,项目名称:BansheeEngine,代码行数:14,代码来源:SerializedSceneObject.cs

示例8: Prefab

 /// <summary>
 /// Creates a new prefab from the provided scene object. If the scene object has an existing prefab link it will 
 /// be broken. After the prefab is created the scene object will be automatically linked to it.
 /// </summary>
 /// <param name="so">Scene object to generate the prefab for.</param>
 public Prefab(SceneObject so)
 {
     IntPtr soPtr = so.GetCachedPtr();
     Internal_CreateInstance(this, soPtr);
 }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:10,代码来源:Prefab.cs

示例9: Prefab

 /// <summary>
 /// Creates a new prefab from the provided scene object. If the scene object has an existing prefab link it will 
 /// be broken. After the prefab is created the scene object will be automatically linked to it.
 /// </summary>
 /// <param name="so">Scene object to generate the prefab for.</param>
 /// <param name="isScene">Determines if the prefab represents a scene or just a generic group of objects.
 ///                       <see cref="IsScene"/></param>
 public Prefab(SceneObject so, bool isScene = true)
 {
     IntPtr soPtr = so.GetCachedPtr();
     Internal_CreateInstance(this, soPtr, isScene);
 }
开发者ID:BearishSun,项目名称:BansheeEngine,代码行数:12,代码来源:Prefab.cs

示例10: GetPrefabUUID

        /// <summary>
        /// Returns the UUID of the prefab attached to the provided scene object. Only works on root prefab objects.
        /// </summary>
        /// <param name="obj">Scene object to retrieve the prefab UUID for.</param>
        /// <returns>Prefab UUID if the object is part of a prefab, null otherwise. </returns>
        public static string GetPrefabUUID(SceneObject obj)
        {
            if (obj == null)
                return null;

            IntPtr objPtr = obj.GetCachedPtr();
            return Internal_GetPrefabUUID(objPtr);
        }
开发者ID:BearishSun,项目名称:BansheeEngine,代码行数:13,代码来源:PrefabUtility.cs

示例11: BreakPrefab

 /// <summary>
 /// Breaks the prefab link on the provided scene object and makes the operation undo-able. 
 /// See <see cref="PrefabUtility.BreakPrefab"/>.
 /// </summary>
 /// <param name="so">Scene object whose prefab link to break.</param>
 /// <param name="description">Optional description of what exactly the command does.</param>
 public static void BreakPrefab(SceneObject so, string description = "")
 {
     if (so != null)
         Internal_BreakPrefab(so.GetCachedPtr(), description);
 }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:11,代码来源:UndoRedo.cs

示例12: ReparentSO

        /// <summary>
        /// Changes the parent of a set of scene objects.
        /// </summary>
        /// <param name="so">Scene objects to change the parent of.</param>
        /// <param name="parent">New parent.</param>
        /// <param name="description">Optional description of what exactly the command does.</param>
        public static void ReparentSO(SceneObject[] so, SceneObject parent, string description = "")
        {
            if (so != null)
            {
                List<IntPtr> soPtrs = new List<IntPtr>();
                for (int i = 0; i < so.Length; i++)
                {
                    if (so[i] != null)
                        soPtrs.Add(so[i].GetCachedPtr());
                }

                if (soPtrs.Count > 0)
                {
                    IntPtr parentPtr = IntPtr.Zero;
                    if (parent != null)
                        parentPtr = parent.GetCachedPtr();

                    Internal_ReparentSOMulti(soPtrs.ToArray(), parentPtr, description);
                }
            }
        }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:27,代码来源:UndoRedo.cs

示例13: RecordSO

 /// <summary>
 /// Records a state of the entire scene object at a specific point and allows you to restore it to its original 
 /// values as needed.
 /// </summary>
 /// <param name="so">Scene object to record.</param>
 /// <param name="recordHierarchy">If true all children of this object will also be recorded.</param>
 /// <param name="description">Optional description of what exactly the command does.</param>
 public static void RecordSO(SceneObject so, bool recordHierarchy = false, string description = "")
 {
     if (so != null)
         Internal_RecordSO(so.GetCachedPtr(), description);
 }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:12,代码来源:UndoRedo.cs

示例14: DeleteSO

 /// <summary>
 /// Deletes a scene object.
 /// </summary>
 /// <param name="so">Scene object to delete.</param>
 /// <param name="description">Optional description of what exactly the command does.</param>
 public static void DeleteSO(SceneObject so, string description = "")
 {
     if (so != null)
         Internal_DeleteSO(so.GetCachedPtr(), description);
 }
开发者ID:Ruu,项目名称:BansheeEngine,代码行数:10,代码来源:UndoRedo.cs


注:本文中的SceneObject.GetCachedPtr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。