コード例 #1
0
        void OnEnable()
        {
            CSAdvertisingPanels bm = (CSAdvertisingPanels)target;

            banner = Resources.Load("CSHeader") as Texture;
            bm.UpdateAdv();
        }
コード例 #2
0
        public override void OnInspectorGUI()
        {
            CSAdvertisingPanels bm = (CSAdvertisingPanels)target;

            GUILayout.Box(banner, GUILayout.ExpandWidth(true));


            bm.advPanelFrontPrefab = EditorGUILayout.ObjectField("AdvertisingPanel template", bm.advPanelFrontPrefab, typeof(GameObject), true) as GameObject;
            if (GUILayout.Button("Update Template"))
            {
                bm.UpdateAdv();
            }



            if (GUI.changed)
            {
                bm.UpdateAdv();
                EditorUtility.SetDirty(bm);
            }
        }