Exemple #1
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode   node   = new YAMLMappingNode();
            ColorRGBA32Layout layout = container.ExportLayout.Serialized.ColorRGBA32;

            node.AddSerializedVersion(layout.Version);
            node.Add(layout.RgbaName, RGBA);
            return(node);
        }
Exemple #2
0
 public SerializedLayoutCategory(LayoutInfo info)
 {
     AABB              = new AABBLayout(info);
     AABBi             = new AABBiLayout(info);
     AnimationCurveTpl = new AnimationCurveTplLayout(info);
     ColorRGBA32       = new ColorRGBA32Layout(info);
     ColorRGBAf        = new ColorRGBAfLayout(info);
     Gradient          = new GradientLayout(info);
     GUIStyle          = new GUIStyleLayout(info);
     LayerMask         = new LayerMaskLayout(info);
     Matrix4x4f        = new Matrix4x4fLayout(info);
     Quaternionf       = new QuaternionfLayout(info);
     Rectf             = new RectfLayout(info);
     RectOffset        = new RectOffsetLayout(info);
     Vector2f          = new Vector2fLayout(info);
     Vector2i          = new Vector2iLayout(info);
     Vector3f          = new Vector3fLayout(info);
     Vector3i          = new Vector3iLayout(info);
     Vector4f          = new Vector4fLayout(info);
 }
Exemple #3
0
        private static void GenerateEngineStruct(TypeTreeContext context, SerializableType origin, string name)
        {
            switch (origin.Name)
            {
            case SerializableType.Vector2Name:
                Vector2fLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.Vector2IntName:
                Vector2iLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.Vector3Name:
                Vector3fLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.Vector3IntName:
                Vector3iLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.Vector4Name:
                Vector4fLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.RectName:
                RectfLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.BoundsName:
                AABBLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.BoundsIntName:
                AABBiLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.QuaternionName:
                QuaternionfLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.Matrix4x4Name:
                Matrix4x4fLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.ColorName:
                ColorRGBAfLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.Color32Name:
                ColorRGBA32Layout.GenerateTypeTree(context, name);
                break;

            case SerializableType.LayerMaskName:
                LayerMaskLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.AnimationCurveName:
                AnimationCurveTplLayout.GenerateTypeTree(context, name, SingleLayout.GenerateTypeTree);
                break;

            case SerializableType.GradientName:
                GradientLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.RectOffsetName:
                RectOffsetLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.GUIStyleName:
                GUIStyleLayout.GenerateTypeTree(context, name);
                break;

            case SerializableType.PropertyNameName:
                PropertyNameLayout.GenerateTypeTree(context, name);
                break;

            default:
                throw new Exception($"Unknown engine struct {origin.Name}");
            }
        }