Search Unity

Can Unity add a Scriptable Object template to the scripting templates folder by default?

Discussion in 'Editor & General Support' started by Ecna_At_Oculus, Aug 22, 2019.

  1. Ecna_At_Oculus

    Ecna_At_Oculus

    Joined:
    Jun 18, 2019
    Posts:
    2
    Over and over I have to go to the scriptable template folder:
    C:\Program Files\Unity\Hub\Editor\2018.3.10f1\Editor\Data\Resources\ScriptTemplates

    And add this script template for scriptable objects (also attached):
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. [CreateAssetMenu(fileName = "#SCRIPTNAME#", menuName = "#SCRIPTNAME#")]
    4. public class #SCRIPTNAME# : ScriptableObject
    5. {
    6.  
    7. }
    And then make sure it's named:
    83-C# Scriptable Object-NewScriptableObjectScript.cs.txt

    Scriptable Objects are so useful, and more people should use them, the world would be a better place with more scriptable objects. It would be great if they appeared by default in the create asset menu!
     

    Attached Files:

    Fep310 likes this.
  2. Vectorbox

    Vectorbox

    Joined:
    Jan 27, 2014
    Posts:
    232
    I felt the same so I created a project template (including the 'Scriptable Object' template) and saved it as a project template custom package. I just import the pack into a new project when required.

    I've created a few such templates to suit common scenarios.
     
    Fep310 and gnurk like this.