示例#1
0
        public static AnimationClip GenerateAndSaveAnimationToCurrentDirectory(List <Sprite> sprites, int frameRate, bool isLooping, string name)
        {
            var animationClip = GenerateAnimation(sprites, frameRate, isLooping, name);

            ObjectCreatorHelper.CreateAsset(animationClip, string.Format("{0}.anim", name));
            return(animationClip);
        }
示例#2
0
        public static T CreateStyle <T>() where T : BaseStyle
        {
            if (!Loaded)
            {
                Load();
            }
            var style = ObjectCreatorHelper.CreateAsset <T>();

            _stylesRepository.AddStyle(style);
            EditorUtility.SetDirty(_stylesRepository);
            return(style);
        }
示例#3
0
        public static void CreateFont()
        {
            var window = Dialog.ShowDialog <CreateFontDialogWindow>("Create font", DialogType.YesNo);

            window.Yes += sender =>
            {
                var font     = CoreUIStyleCreator.CreateStyle <CoreUIFont>(sender.Name);
                var material = new Material(Shader.Find("CoreUI/CoreUITextMeshShader"));
                material.SetTexture("_MainTex", sender.Texture);
                font.Material = material;
                ObjectCreatorHelper.CreateAsset(material, string.Format("{0}.mat", sender.Name));
                font.Texture = sender.Texture;
            };
        }
示例#4
0
 public static void CreateSettingsContainer()
 {
     ObjectCreatorHelper.CreateAsset <PresentationSettings>();
 }
示例#5
0
 public static void CreateStylesRepository()
 {
     ObjectCreatorHelper.CreateAsset <StylesRepository>();
 }