public AssetLayout(LayoutInfo info) { Info = info; IsAlign = info.Version.IsGreaterEqual(2, 1); IsAlignArrays = info.Version.IsGreaterEqual(2017); IsStructSerializable = info.Version.IsGreaterEqual(4, 5); PPtr = new PPtrLayout(info); Misc = new MiscLayoutCategory(info); Serialized = new SerializedLayoutCategory(info); Animation = new AnimationLayout(info); AnimationClip = new AnimationClipLayout(info); Behaviour = new BehaviourLayout(info); Component = new ComponentLayout(info); EditorExtension = new EditorExtensionLayout(info); Font = new FontLayout(info); GameObject = new GameObjectLayout(info); MonoBehaviour = new MonoBehaviourLayout(info); MonoScript = new MonoScriptLayout(info); NamedObject = new NamedObjectLayout(info); Object = new ObjectLayout(info); Prefab = new PrefabLayout(info); PrefabInstance = new PrefabInstanceLayout(info); Texture2D = new Texture2DLayout(info); Transform = new TransformLayout(info); ClassNames = CreateClassNames(); }
public static void GenerateTypeTree(TypeTreeContext context, string name) { GUIStyleStateLayout layout = context.Layout.Serialized.GUIStyle.GUIStyleState; context.AddNode(layout.Name, name); context.BeginChildren(); context.AddPPtr(context.Layout.Texture2D.Name, layout.BackgroundName); if (layout.HasScaledBackgrounds) { context.AddArray(layout.ScaledBackgroundsName, (c, n) => PPtrLayout.GenerateTypeTree(c, c.Layout.Texture2D.Name, n)); } ColorRGBAfLayout.GenerateTypeTree(context, layout.TextColorName); context.EndChildren(); }
public static void GenerateTypeTree(TypeTreeContext context, string type, string name) { PPtrLayout layout = context.Layout.PPtr; context.AddNode($"PPtr<{type}>", name); context.BeginChildren(); context.AddInt32(layout.FileIDName); if (layout.IsLongID) { context.AddInt64(layout.PathIDName); } else { context.AddInt32(layout.PathIDName); } context.EndChildren(); }