public virtual void OnAfterDeserialize()
 {
     negative             = SerializationHelper.DeserializeObj <InputBinding <ButtonControl, float> >(m_SerializedNegative, new object[] {});
     positive             = SerializationHelper.DeserializeObj <InputBinding <ButtonControl, float> >(m_SerializedPositive, new object[] {});
     m_SerializedNegative = new SerializationHelper.JSONSerializedElement();
     m_SerializedPositive = new SerializationHelper.JSONSerializedElement();
 }
Пример #2
0
 public virtual void OnAfterDeserialize()
 {
     x             = SerializationHelper.DeserializeObj <InputBinding <AxisControl, float> >(m_SerializedX, new object[] {});
     y             = SerializationHelper.DeserializeObj <InputBinding <AxisControl, float> >(m_SerializedY, new object[] {});
     m_SerializedX = new SerializationHelper.JSONSerializedElement();
     m_SerializedY = new SerializationHelper.JSONSerializedElement();
 }
Пример #3
0
        public void OnBeforeSerialize()
        {
            m_SerializableSources    = SerializationHelper.Serialize(m_Sources);
            m_SerializableProcessors = SerializationHelper.Serialize(m_Processors);

            m_SerializableReferenceControl = SerializationHelper.SerializeObj(m_ReferenceControl);
        }
Пример #4
0
 public void OnBeforeSerialize()
 {
     m_SerializeableSourceGraphGuid = SerializationHelper.Serialize(m_SourceGraphGuid);
     m_SerializableNodes            = SerializationHelper.Serialize <INode>(m_Nodes);
     m_SerializableEdges            = SerializationHelper.Serialize <IEdge>(m_Edges);
     m_SerilaizeableProperties      = SerializationHelper.Serialize <IShaderProperty>(m_Properties);
     m_SerializableMetaProperties   = SerializationHelper.Serialize <IShaderProperty>(m_MetaProperties);
 }
 public virtual void OnAfterDeserialize()
 {
     m_Main                  = SerializationHelper.DeserializeObj <ControlReferenceBinding <ButtonControl, float> >(m_SerializedMain, new object[] {});
     m_Modifiers             = SerializationHelper.Deserialize <ControlReferenceBinding <ButtonControl, float> >(m_SerializedModifiers, new object[] {});
     m_ModifierSet           = SerializationHelper.Deserialize <ControlReferenceBinding <ButtonControl, float> >(m_SerializedModifierSet, new object[] {});
     m_SerializedMain        = new SerializationHelper.JSONSerializedElement();
     m_SerializedModifiers   = null;
     m_SerializedModifierSet = null;
 }
Пример #6
0
        public void OnAfterDeserialize()
        {
            m_Sources                = SerializationHelper.Deserialize <InputBinding <C, T> >(m_SerializableSources, new object[] {});
            m_SerializableSources    = null;
            m_Processors             = SerializationHelper.Deserialize <InputBindingProcessor <C, T> >(m_SerializableProcessors, new object[] {});
            m_SerializableProcessors = null;

            m_ReferenceControl             = SerializationHelper.DeserializeObj <InputControl <T> >(m_SerializableReferenceControl, new object[] {});
            m_SerializableReferenceControl = new SerializationHelper.JSONSerializedElement();
        }
Пример #7
0
        public void WriteData(IEnumerable <AbstractShaderProperty> inputs, IEnumerable <ShaderKeyword> keywords, IEnumerable <ShaderDropdown> dropdowns, IEnumerable <AbstractShaderProperty> nodeProperties, IEnumerable <MaterialSlot> outputs, IEnumerable <Target> unsupportedTargets)
        {
            if (m_SubGraphData == null)
            {
                m_SubGraphData = new SubGraphData();
                m_SubGraphData.OverrideObjectId(assetGuid, "_subGraphData");
            }

            m_SubGraphData.inputs.Clear();
            m_SubGraphData.keywords.Clear();
            m_SubGraphData.dropdowns.Clear();
            m_SubGraphData.nodeProperties.Clear();
            m_SubGraphData.outputs.Clear();
            m_SubGraphData.unsupportedTargets.Clear();

            foreach (var input in inputs)
            {
                m_SubGraphData.inputs.Add(input);
            }

            foreach (var keyword in keywords)
            {
                m_SubGraphData.keywords.Add(keyword);
            }

            foreach (var dropdown in dropdowns)
            {
                m_SubGraphData.dropdowns.Add(dropdown);
            }

            foreach (var nodeProperty in nodeProperties)
            {
                m_SubGraphData.nodeProperties.Add(nodeProperty);
            }

            foreach (var output in outputs)
            {
                m_SubGraphData.outputs.Add(output);
            }

            foreach (var unsupportedTarget in unsupportedTargets)
            {
                m_SubGraphData.unsupportedTargets.Add(unsupportedTarget);
            }
            var json = MultiJson.Serialize(m_SubGraphData);

            m_SerializedSubGraphData = new SerializationHelper.JSONSerializedElement()
            {
                JSONnodeData = json
            };
            m_SubGraphData = null;
        }
Пример #8
0
        public void WriteData(IEnumerable <AbstractShaderProperty> inputs, IEnumerable <ShaderKeyword> keywords, IEnumerable <AbstractShaderProperty> nodeProperties, IEnumerable <MaterialSlot> outputs)
        {
            if (m_SubGraphData == null)
            {
                m_SubGraphData = new SubGraphData();
            }
            m_SubGraphData.inputs.Clear();
            m_SubGraphData.keywords.Clear();
            m_SubGraphData.nodeProperties.Clear();
            m_SubGraphData.outputs.Clear();

            foreach (var input in inputs)
            {
                m_SubGraphData.inputs.Add(input);
            }

            foreach (var keyword in keywords)
            {
                m_SubGraphData.keywords.Add(keyword);
            }

            foreach (var nodeProperty in nodeProperties)
            {
                m_SubGraphData.nodeProperties.Add(nodeProperty);
            }

            foreach (var output in outputs)
            {
                m_SubGraphData.outputs.Add(output);
            }
            var json = MultiJson.Serialize(m_SubGraphData);

            m_SerializedSubGraphData = new SerializationHelper.JSONSerializedElement()
            {
                JSONnodeData = json
            };
            m_SubGraphData = null;
        }
Пример #9
0
 public virtual void OnAfterDeserialize()
 {
     selfBinding = SerializationHelper.DeserializeObj <InputBinding>(m_SerializableSelfBinding, new object[] {});
     m_SerializableSelfBinding = new SerializationHelper.JSONSerializedElement();
 }
Пример #10
0
 public virtual void OnBeforeSerialize()
 {
     m_SerializableSelfBinding = SerializationHelper.SerializeObj(selfBinding);
 }
 public virtual void OnBeforeSerialize()
 {
     m_SerializedMain        = SerializationHelper.SerializeObj(m_Main);
     m_SerializedModifiers   = SerializationHelper.Serialize(m_Modifiers);
     m_SerializedModifierSet = SerializationHelper.Serialize(m_ModifierSet);
 }
Пример #12
0
 public virtual void OnAfterDeserialize()
 {
     binding             = SerializationHelper.DeserializeObj <ControlReferenceBinding <PoseControl, Pose> >(m_SerializedBinding, new object[] {});
     m_SerializedBinding = new SerializationHelper.JSONSerializedElement();
 }
 public virtual void OnBeforeSerialize()
 {
     m_SerializedNegative = SerializationHelper.SerializeObj(negative);
     m_SerializedPositive = SerializationHelper.SerializeObj(positive);
 }
Пример #14
0
 public virtual void OnBeforeSerialize()
 {
     m_SerializedX = SerializationHelper.SerializeObj(x);
     m_SerializedY = SerializationHelper.SerializeObj(y);
 }