Esempio n. 1
0
 /// <summary>
 /// Updates the transform of the GUI widget with the latest transform from the parent SceneObject.
 /// </summary>
 /// <param name="parentSO">Scene object the GUI widget component is attached to.</param>
 internal void UpdateTransform(SceneObject parentSO)
 {
     if (parentSO != null)
     {
         Internal_UpdateTransform(mCachedPtr, parentSO.GetCachedPtr());
     }
 }
Esempio n. 2
0
        /// <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);
        }