예제 #1
0
        /// <summary>Copies a Plugin Settings' values into the main asset.</summary>
        public static PluginSettings SetAssetAsGlobal(string assetPath)
        {
            PluginSettings valuesToCopy = UnityEditor.AssetDatabase.LoadAssetAtPath <PluginSettings>(assetPath);

            if (valuesToCopy == null)
            {
                Debug.LogError("[mod.io] PluginSettings at " + assetPath + " could not be found and"
                               + " thus the globally used PluginSettings asset was unchanged.");
                return(null);
            }

            return(PluginSettings.SetGlobalValues(valuesToCopy.m_data));
        }