-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathEditorSettings.bindings.cs
More file actions
321 lines (257 loc) · 12.5 KB
/
EditorSettings.bindings.cs
File metadata and controls
321 lines (257 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
using System.Linq;
using UnityEngine.Bindings;
using Object = UnityEngine.Object;
namespace UnityEditor
{
public enum SerializationMode
{
Mixed = 0,
ForceBinary = 1,
ForceText = 2
}
public enum EditorBehaviorMode
{
Mode3D = 0,
Mode2D = 1
}
public enum SpritePackerMode
{
Disabled = 0,
[Obsolete("Sprite Packing Tags are deprecated. Please use Sprite Atlas asset.")]
BuildTimeOnly = 1,
[Obsolete("Sprite Packing Tags are deprecated. Please use Sprite Atlas asset.")]
AlwaysOn = 2,
BuildTimeOnlyAtlas = 3,
AlwaysOnAtlas = 4,
SpriteAtlasV2 = 5,
SpriteAtlasV2Build = 6,
}
public enum LineEndingsMode
{
OSNative = 0,
Unix = 1,
Windows = 2
}
public enum AssetPipelineMode
{
Version1 = 0,
Version2 = 1
}
public enum CacheServerMode
{
AsPreferences = 0,
Enabled = 1,
Disabled = 2
}
public enum CacheServerValidationMode
{
Disabled = 0,
UploadOnly = 1,
Enabled = 2,
Required = 3
}
[Flags]
public enum EnterPlayModeOptions
{
None = 0,
DisableDomainReload = 1 << 0,
DisableSceneReload = 1 << 1,
[Obsolete("Option has no effect and is deprecated.")]
DisableSceneBackupUnlessDirty = 1 << 2
}
[NativeHeader("Editor/Src/EditorSettings.h")]
[NativeHeader("Editor/Src/VersionControlSettings.h")]
[NativeHeader("Editor/Src/EditorUserSettings.h")]
public sealed class EditorSettings : Object
{
internal enum Bc7TextureCompressor
{
Default = 0,
Ispc = 1,
Bc7e = 2,
}
private EditorSettings()
{
}
// Device that editor should use for Unity Remote
public static string unityRemoteDevice
{
get { return GetConfigValue("UnityRemoteDevice"); }
set { SetConfigValue("UnityRemoteDevice", value); }
}
// Compression method for Unity Remote to use
public static string unityRemoteCompression
{
get { return GetConfigValue("UnityRemoteCompression"); }
set { SetConfigValue("UnityRemoteCompression", value); }
}
// Screen size for Unity Remote to use
public static string unityRemoteResolution
{
get { return GetConfigValue("UnityRemoteResolution"); }
set { SetConfigValue("UnityRemoteResolution", value); }
}
// Remote joystick input behavior for Unity Remote (use local / override with remote)
public static string unityRemoteJoystickSource
{
get { return GetConfigValue("UnityRemoteJoystickSource"); }
set { SetConfigValue("UnityRemoteJoystickSource", value); }
}
[System.Obsolete(@"Use VersionControlSettings.mode instead.")]
[StaticAccessor("GetVersionControlSettings()", StaticAccessorType.Dot)]
public static extern string externalVersionControl
{
[NativeMethod("GetMode")]
get;
[NativeMethod("SetMode")]
set;
}
[FreeFunction("GetEditorSettings")]
internal static extern EditorSettings GetEditorSettings();
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern SerializationMode serializationMode { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern LineEndingsMode lineEndingsForNewScripts { get; set; }
[Obsolete("EditorSettings.webSecurityEmulationEnabled is no longer supported, " +
"since the Unity Web Player is no longer supported by Unity.")]
public static bool webSecurityEmulationEnabled
{
get { return false; }
set {}
}
[Obsolete("EditorSettings.webSecurityEmulationHostUrl is no longer supported, " +
"since the Unity Web Player is no longer supported by Unity.")]
public static string webSecurityEmulationHostUrl
{
get { return ""; }
set {}
}
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern EditorBehaviorMode defaultBehaviorMode { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern SceneAsset prefabRegularEnvironment { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern SceneAsset prefabUIEnvironment { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool prefabModeAllowAutoSave { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern SpritePackerMode spritePackerMode { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern int spritePackerPaddingPower { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
internal static extern Bc7TextureCompressor bc7TextureCompressor { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern int etcTextureCompressorBehavior { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern int etcTextureFastCompressor {[NativeMethod("GetEtcTextureFastCompressorNoOffset")] get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern int etcTextureNormalCompressor {[NativeMethod("GetEtcTextureNormalCompressorNoOffset")] get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern int etcTextureBestCompressor {[NativeMethod("GetEtcTextureBestCompressorNoOffset")] get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool enableTextureStreamingInEditMode { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool enableTextureStreamingInPlayMode { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool asyncShaderCompilation { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static bool cachingShaderPreprocessor { get { return true; } set {} }
public static string[] projectGenerationUserExtensions
{
get
{
return Internal_ProjectGenerationUserExtensions
.Split(new[] {';'}, StringSplitOptions.RemoveEmptyEntries).Select(s => s.TrimStart('.', '*'))
.ToArray();
}
set { Internal_ProjectGenerationUserExtensions = string.Join(";", value); }
}
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static string[] projectGenerationBuiltinExtensions
{
get { return new[] { "cs", "uxml", "uss", "shader", "compute", "cginc", "hlsl", "glslinc", "template", "raytrace" }; }
}
internal static extern string Internal_ProjectGenerationUserExtensions
{
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
[NativeMethod("GetProjectGenerationIncludedExtensions")]
get;
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
[NativeMethod("SetProjectGenerationIncludedExtensions")]
set;
}
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern string projectGenerationRootNamespace { get; set; }
[StaticAccessor("GetEditorUserSettings()", StaticAccessorType.Dot)]
private static extern string GetConfigValue(string name);
[StaticAccessor("GetEditorUserSettings()", StaticAccessorType.Dot)]
private static extern void SetConfigValue(string name, string value);
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
internal static extern void SetEtcTextureCompressorLegacyBehavior();
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
internal static extern void SetEtcTextureCompressorDefaultBehavior();
[Obsolete("EditorSettings.useLegacyProbeSampleCount is deprecated. The legacy method of selecting probe sample counts will be removed in a future release.", false)]
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool useLegacyProbeSampleCount { get; set; }
[Obsolete("EditorSettings.disableCookiesInLightmapper is obsolete, please use EditorSettings.enableCookiesInLightmapper instead.", false)]
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool disableCookiesInLightmapper { get; set; }
public static bool enableCookiesInLightmapper
{
#pragma warning disable 618
get { return !disableCookiesInLightmapper; }
set { disableCookiesInLightmapper = !value; }
#pragma warning restore 618
}
[Obsolete("Bake with the Progressive Lightmapper.The backend that uses Enlighten to bake is obsolete.", true)]
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool enableEnlightenBakedGI { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool enterPlayModeOptionsEnabled { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern EnterPlayModeOptions enterPlayModeOptions { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool serializeInlineMappingsOnOneLine { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern AssetPipelineMode assetPipelineMode { get; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern CacheServerMode cacheServerMode { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern AssetDatabase.RefreshImportMode refreshImportMode { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern string cacheServerEndpoint { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern string cacheServerNamespacePrefix { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool cacheServerEnableDownload { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool cacheServerEnableUpload { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool cacheServerEnableAuth { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool cacheServerEnableTls { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern CacheServerValidationMode cacheServerValidationMode { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern Int32 cacheServerDownloadBatchSize { get; set; }
public enum NamingScheme
{
SpaceParenthesis = 0,
Dot,
Underscore
// note: C++ code has more, but we don't want to expose them for Hierarchy naming
}
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern int gameObjectNamingDigits { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern NamingScheme gameObjectNamingScheme { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
public static extern bool assetNamingUsesSpace { get; set; }
[StaticAccessor("GetEditorSettings()", StaticAccessorType.Dot)]
internal static extern bool inspectorUseIMGUIDefaultInspector { get; set; }
}
}