Ejemplo n.º 1
0
        public static ST2USettings LoadSettings()
        {
            // Find the first ST2U setting asset
            const string search = "t:ST2USettings";

            return(AssetDatabaseEx.LoadFirstAssetByFilter <ST2USettings>(search));
        }
Ejemplo n.º 2
0
 public void AssignIcons()
 {
     m_SettingsIcon = AssetDatabaseEx.LoadFirstAssetByFilter <Texture2D>("tiled-settings-icon-0x1badd00d");
     m_TmxIcon      = AssetDatabaseEx.LoadFirstAssetByFilter <Texture2D>("tmx-file-icon-0x1badd00d");
     m_TsxIcon      = AssetDatabaseEx.LoadFirstAssetByFilter <Texture2D>("tsx-file-icon-0x1badd00d");
     m_TxIcon       = AssetDatabaseEx.LoadFirstAssetByFilter <Texture2D>("tx-file-icon-0x1badd00d");
 }
Ejemplo n.º 3
0
        public static Texture2D GetWorldIcon()
        {
            if (m_WorldIcon == null)
            {
                m_WorldIcon = AssetDatabaseEx.LoadFirstAssetByFilter <Texture2D>("world-file-icon-0x1badd00d");
            }

            return(m_WorldIcon);
        }
Ejemplo n.º 4
0
        public static Texture2D GetSettingsIcon()
        {
            if (m_SettingsIcon == null)
            {
                m_SettingsIcon = AssetDatabaseEx.LoadFirstAssetByFilter <Texture2D>("tiled-settings-icon-0x1badd00d");
            }

            return(m_SettingsIcon);
        }
        protected override void InternalOnImportAsset()
        {
            var icon = AssetDatabaseEx.LoadFirstAssetByFilter <Texture2D>("tx-file-icon-0x1badd00d");

            AddSuperAsset <SuperAssetTemplate>();

            // Create our asset and build it out
            m_ObjectTemplate = ScriptableObject.CreateInstance <ObjectTemplate>();
            AssetImportContext.AddObjectToAsset("_template", m_ObjectTemplate, icon);
            AssetImportContext.SetMainObject(m_ObjectTemplate);

            // Tx files are XML that contain the data for one object
            XDocument doc       = XDocument.Load(this.assetPath);
            var       xTemplate = doc.Element("template");

            ProcessTemplate(xTemplate);
        }
Ejemplo n.º 6
0
        public static SuperIcons LoadIcons()
        {
            const string search = "t:SuperIcons";

            return(AssetDatabaseEx.LoadFirstAssetByFilter <SuperIcons>(search));
        }