Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataValue"/> struct.
 /// </summary>
 /// <param name="value">The value.</param>
 public DataValue(object value)
 {
     if (value is SceneGraph.SceneGraphNode editorNode)
     {
         Generic    = null;
         FlaxObject = null;
         EditorNode = editorNode;
     }
     else if (value is FlaxEngine.Object flaxObject)
     {
         Generic    = null;
         FlaxObject = flaxObject;
         EditorNode = null;
     }
     else
     {
         Generic    = value;
         FlaxObject = null;
         EditorNode = null;
     }
 }
Пример #2
0
            /// <summary>
            /// Initializes a new instance of the <see cref="DataValue"/> struct.
            /// </summary>
            /// <param name="value">The value.</param>
            public DataValue(object value)
            {
                Generic    = null;
                FlaxObject = null;
                EditorNode = null;
                Id         = null;

                if (value is SceneGraph.SceneGraphNode editorNode)
                {
                    EditorNode = editorNode;
                }
                else if (value is FlaxEngine.Object flaxObject)
                {
                    FlaxObject = flaxObject;
                }
                else if (value is Guid guid)
                {
                    Id = guid;
                }
                else
                {
                    Generic = value;
                }
            }