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); }
public static T CreateStyle <T>() where T : BaseStyle { if (!Loaded) { Load(); } var style = ObjectCreatorHelper.CreateAsset <T>(); _stylesRepository.AddStyle(style); EditorUtility.SetDirty(_stylesRepository); return(style); }
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; }; }
public static void CreateSettingsContainer() { ObjectCreatorHelper.CreateAsset <PresentationSettings>(); }
public static void CreateStylesRepository() { ObjectCreatorHelper.CreateAsset <StylesRepository>(); }