public override void Write(IValueStorage targetObject, T sourceObject)
            {
                UdonBehaviourHeapData heapStorage = UdonSharpBehaviourFormatterManager.GetHeapData(UdonSharpEditorUtility.GetBackingUdonBehaviour(sourceObject));

                if (heapStorage != null)
                {
                    writeDelegate(heapStorage.heapFieldValues, ref sourceObject, EditorApplication.isPlaying);
                }
            }
            public override void Read(ref T targetObject, IValueStorage sourceObject)
            {
                UdonBehaviourHeapData heapStorage = UdonSharpBehaviourFormatterManager.GetHeapData((UdonBehaviour)sourceObject.Value);

                if (heapStorage != null)
                {
                    readDelegate(heapStorage.heapFieldValues, ref targetObject, EditorApplication.isPlaying);
                }
            }
Beispiel #3
0
            public override void Read(ref T targetObject, IValueStorage sourceObject)
            {
                UdonBehaviourHeapData heapStorage = UdonSharpBehaviourFormatterManager.GetHeapData((UdonBehaviour)sourceObject.Value);

                if (heapStorage != null)
                {
                    readDelegate(heapStorage.heapFieldValues, ref targetObject, EditorApplication.isPlaying && !UsbSerializationContext.CurrentPolicy.IsPreBuildSerialize);
                }
            }
Beispiel #4
0
            public override void Write(IValueStorage targetObject, T sourceObject)
            {
                UdonBehaviour         backingBehaviour = UdonSharpEditorUtility.GetBackingUdonBehaviour(sourceObject);
                UdonBehaviourHeapData heapStorage      = UdonSharpBehaviourFormatterManager.GetHeapData(backingBehaviour);

                if (heapStorage == null)
                {
                    return;
                }

                writeDelegate(heapStorage.heapFieldValues, ref sourceObject, EditorApplication.isPlaying && !UsbSerializationContext.CurrentPolicy.IsPreBuildSerialize);

                if (!UsbSerializationContext.CollectDependencies && !EditorApplication.isPlaying)
                {
                    PrefabUtility.RecordPrefabInstancePropertyModifications(backingBehaviour);
                }
            }