initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,30 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.Build.Pipeline.Utilities
|
||||
{
|
||||
static class PlayerSettingsApi
|
||||
{
|
||||
static SerializedObject m_Target;
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
static SerializedProperty m_NumberOfMipsStripped;
|
||||
#endif
|
||||
|
||||
static PlayerSettingsApi()
|
||||
{
|
||||
var playerSettings = AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/ProjectSettings.asset");
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
m_Target = new SerializedObject(playerSettings);
|
||||
m_NumberOfMipsStripped = m_Target.FindProperty("numberOfMipsStripped");
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
internal static int GetNumberOfMipsStripped()
|
||||
{
|
||||
m_Target.Update();
|
||||
return m_NumberOfMipsStripped.intValue;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue