GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Initialize Project Script Initialize Project Script
mika edited this page
You can use custom project initialization scripts (these are copied into New Project and executed at first launch).
using System.Collections; using System.Collections.Generic; using System.IO; using UnityEditor; using UnityEngine; namespace UnityLauncherProTools { public class InitializeProject { // settings static string[] folders = new string[] { "Fonts", "Materials", "Models", "Prefabs", "Scenes", "Scripts", "Shaders", "Sounds", "Textures" }; static string assetsFolder; [MenuItem("Tools/Initialize Project")] public static void Init() { assetsFolder = Application.dataPath; CreateFolders(); // TODO adjust project settings, linear, company name // TODO remove extra packages // TODO setup light settings // TODO adjust mainscene: camera pos, skybox off? // TODO save mainscene // TODO add mainscene to build scenes list // TODO adjust quality settings (but only in mobile?) // TODO self destruct this editor script file? // refresh folder AssetDatabase.Refresh(); } static void CreateFolders() { // create each folder if it doesnt exists foreach (string folder in folders) { if (!Directory.Exists(assetsFolder + "/" + folder)) { Directory.CreateDirectory(assetsFolder + "/" + folder); } } } } } Clone this wiki locally |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |