Version: 2020.1
LanguageEnglish
  • C#

EditorSettings.projectGenerationUserExtensions

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static string[] projectGenerationUserExtensions;

Description

Controls list of extensions of files that will be included in the c# .csproj projects that Unity generates.

Use this if you have certain file formats that you'd like to add to the .csproj files for convenient editing. This setting takes a semicolon-separated string of extensions. Leading dots are optional. This setting is specific to a project. In addition to these extensions, there is also a hardcoded built-in list of extensions that is always included at EditorSettings.projectGenerationBuiltinExtensions.

using UnityEngine;
using UnityEditor;

public class Example { [MenuItem("TryMe/SetExtensions")] static void Doit() { EditorSettings.projectGenerationUserExtensions = new[] { "txt", "xml", ".cs", "myfunkyformat"}; } }

Did you find this page useful? Please give it a rating: