public static TransformHierarchy Read(UnsafeReader reader)
 {
     return(new TransformHierarchy(HierarchyReferenceUtil.ReadLocalReferenceFrom(reader),
                                   HierarchyReferenceUtil.ReadLocalReferenceFrom(reader),
                                   HierarchyReferenceUtil.ReadLocalReferenceFrom(reader),
                                   reader.ReadInt32()));
 }
 public static ScriptComponentHierarchy Read(UnsafeReader reader)
 {
     return(new ScriptComponentHierarchy(
                HierarchyReferenceUtil.ReadLocalReferenceFrom(reader),
                HierarchyReferenceUtil.ReadLocalReferenceFrom(reader),
                HierarchyReferenceUtil.ReadExternalReferenceFrom(reader)));
 }
Esempio n. 3
0
        public static AnimatorStateScriptUsage ReadFrom([NotNull] UnsafeReader reader)
        {
            var animatorStateReference        = HierarchyReferenceUtil.ReadLocalReferenceFrom(reader);
            var animatorStateName             = reader.ReadString();
            var stateMachineBehavioursAnchors = ReadStateMachineBehavioursAnchors(reader);

            return(new AnimatorStateScriptUsage(animatorStateReference, animatorStateName ?? "",
                                                stateMachineBehavioursAnchors));
        }
Esempio n. 4
0
        private static object Read(UnsafeReader reader)
        {
            var target = HierarchyReferenceUtil.ReadReferenceFrom(reader);
            var path   = reader.ReadString();
            var value  = reader.ReadPolymorphic <IAssetValue>();
            var range  = new TextRange(reader.ReadInt(), reader.ReadInt());
            IHierarchyReference objectReference = null;

            if (reader.ReadBool())
            {
                objectReference = HierarchyReferenceUtil.ReadReferenceFrom(reader);
            }
            return(new PrefabModification(target, path, value, range, objectReference));
        }
Esempio n. 5
0
        public static UnityEventData ReadFrom(UnsafeReader reader)
        {
            var name            = reader.ReadString();
            var location        = HierarchyReferenceUtil.ReadLocalReferenceFrom(reader);
            var scriptReference = HierarchyReferenceUtil.ReadExternalReferenceFrom(reader);
            var count           = reader.ReadInt();
            var calls           = new List <AssetMethodUsages>();

            for (int i = 0; i < count; i++)
            {
                calls.Add(AssetMethodUsages.ReadFrom(reader));
            }

            return(new UnityEventData(name, location, scriptReference, calls));
        }
Esempio n. 6
0
        public static AnimationUsage ReadFrom([NotNull] UnsafeReader reader)
        {
            var animationReference = HierarchyReferenceUtil.ReadLocalReferenceFrom(reader);
            var animationName      = reader.ReadString();
            var sampleRate         = reader.ReadInt();
            var functionName       = reader.ReadString();

            if (animationName is null || functionName is null)
            {
                return(null);
            }
            var time = reader.ReadDouble();
            var guid = reader.ReadGuid();

            return(new AnimationUsage(animationReference, animationName, sampleRate, functionName, time, guid));
        }
        public static PrefabInstanceHierarchy Read(UnsafeReader reader)
        {
            var location        = HierarchyReferenceUtil.ReadLocalReferenceFrom(reader);
            var parentTransform = HierarchyReferenceUtil.ReadLocalReferenceFrom(reader);
            var count           = reader.ReadInt32();
            var modifications   = new List <PrefabModification>();

            for (int i = 0; i < count; i++)
            {
                modifications.Add(reader.ReadPolymorphic <PrefabModification>());
            }

            var sourcePrefabGuid = reader.ReadGuid();

            return(new PrefabInstanceHierarchy(location, parentTransform, modifications, sourcePrefabGuid));
        }
 private static object Read(UnsafeReader reader) => new InspectorVariableUsage(
     HierarchyReferenceUtil.ReadLocalReferenceFrom(reader),
     HierarchyReferenceUtil.ReadExternalReferenceFrom(reader),
     reader.ReadString(),
     reader.ReadPolymorphic <IAssetValue>());
Esempio n. 9
0
 public static GameObjectHierarchy Read(UnsafeReader reader)
 {
     return(new GameObjectHierarchy(HierarchyReferenceUtil.ReadLocalReferenceFrom(reader), reader.ReadString()));
 }
 public static StrippedHierarchyElement Read(UnsafeReader reader)
 {
     return(new StrippedHierarchyElement(HierarchyReferenceUtil.ReadLocalReferenceFrom(reader),
                                         HierarchyReferenceUtil.ReadLocalReferenceFrom(reader),
                                         HierarchyReferenceUtil.ReadExternalReferenceFrom(reader)));
 }
 private static object Read(UnsafeReader reader) => new AssetReferenceValue(HierarchyReferenceUtil.ReadReferenceFrom(reader));
Esempio n. 12
0
        public static AssetScriptUsage ReadFrom(UnsafeReader reader)
        {
            var localReference = HierarchyReferenceUtil.ReadLocalReferenceFrom(reader);

            return(new AssetScriptUsage(localReference, HierarchyReferenceUtil.ReadExternalReferenceFrom(reader)));
        }
 public static ComponentHierarchy Read(UnsafeReader reader)
 {
     return(new ComponentHierarchy(HierarchyReferenceUtil.ReadLocalReferenceFrom(reader),
                                   HierarchyReferenceUtil.ReadLocalReferenceFrom(reader), reader.ReadString()));
 }
 public static ImportedValueReference ReadFrom(UnsafeReader reader)
 {
     return(new ImportedValueReference(HierarchyReferenceUtil.ReadLocalReferenceFrom(reader), reader.ReadString()));
 }
 public static AssetMethodUsages ReadFrom(UnsafeReader reader)
 {
     return(new AssetMethodUsages(reader.ReadString(), reader.ReadString(),
                                  new TextRange(reader.ReadInt32(), reader.ReadInt32()), AssetUtils.ReadOWORD(reader),
                                  (EventHandlerArgumentMode)reader.ReadInt32(), reader.ReadString(), HierarchyReferenceUtil.ReadReferenceFrom(reader)));
 }