• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# UnityEngine.GUISkin类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中UnityEngine.GUISkin的典型用法代码示例。如果您正苦于以下问题:C# GUISkin类的具体用法?C# GUISkin怎么用?C# GUISkin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GUISkin类属于UnityEngine命名空间,在下文中一共展示了GUISkin类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: VideoSuscribeWindow

 public VideoSuscribeWindow(GUISkin skin, RoomVariableManager rvm, Texture2D videoDef, Texture2D videoTimeOut)
 {
     gSkin = skin;
     RoomVariableMgr = rvm;
     windowsCreated = false;
     adviceMessage = "No se selecciono usuario";
     endSuscriptionMessage = "Terminar suscripcion";
     endSuscriptionQuestion = "Desea terminar la suscripcion?";
     videoFrame = new VidFrame(false);
     videoRunning = false;
     adviceWindowOn = false;
     closeQuestionOn = false;
     totalWidth = 500;
     menuWidth = totalWidth/3;
     listWidth = totalWidth-menuWidth;
     totalHeight = 400;
     conectionsList = new List<GUIContent>();
     userScrollPosition = Vector2.zero;
     conectionScrollPosition = Vector2.zero;
     selectedConection = -1;
     tempSelectedConection = -1;
     selectedUser = -1;
     tempSelectedUser = -1;
     videoDefault = videoDef;
     enableWindow = false;
     timedOut = false;
     videoTimedOut = videoTimeOut;
     countDownTimer = new CountDownTimer(10);
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:29,代码来源:VideoSuscribeWindow.cs


示例2: Awake

 void Awake()
 {
     this.skin = Resources.Load <GUISkin>(GuiSkinLocation);
     this.recorder = GetComponent<RecordingManaging>();
     this.InitLogo();
     DontDestroyOnLoad(this.gameObject);
 }
开发者ID:freddiehonohan,项目名称:HapticHealth,代码行数:7,代码来源:ModalityManager.cs


示例3: Label

 public Label(string pTextureName, string pLabel, Vector2 pPosition, string pSkinName)
     : base(pTextureName, pPosition)
 {
     _label = pLabel;
     _skin = (GUISkin)Resources.Load(pSkinName);
     if(_skin == null) { throw new Exception("Can't find BasicSkin"); }
 }
开发者ID:eriksvedang,项目名称:GuiImprove,代码行数:7,代码来源:Label.cs


示例4: Button

 /// <summary>
 /// Initializes a new instance of the <see cref="Button"/> class.
 /// </summary>
 /// <param name='bounds'>
 /// Bounds.
 /// </param>
 /// <param name='content'>
 /// Content.
 /// </param>
 /// <param name='style'>
 /// Style.
 /// </param>
 public Button(Rectangle bounds, GUIContent content, GUISkin skin)
     : this()
 {
     this.Bounds = bounds;
     this.Content = content;
     this.Skin = skin;
 }
开发者ID:miguelmartin75,项目名称:Survival,代码行数:19,代码来源:Button.cs


示例5: Styles

			public Styles() {

				#if UNITY_EDITOR
				this.skin = Resources.Load<GUISkin>("UI.Windows/Core/Styles/Boxes/" + (UnityEditor.EditorGUIUtility.isProSkin == true ? "SkinDark" : "SkinLight"));
				this.boxes = new GUIStyle[WindowLayoutStyles.MAX_DEPTH] {
					
					this.skin.FindStyle("flow node 0"),
					this.skin.FindStyle("flow node 1"),
					this.skin.FindStyle("flow node 2"),
					this.skin.FindStyle("flow node 3"),
					this.skin.FindStyle("flow node 4"),
					this.skin.FindStyle("flow node 5")
					
				};
				this.boxesSelected = new GUIStyle[WindowLayoutStyles.MAX_DEPTH] {
					
					this.skin.FindStyle("flow node 0"), // on
					this.skin.FindStyle("flow node 1"),
					this.skin.FindStyle("flow node 2"),
					this.skin.FindStyle("flow node 3"),
					this.skin.FindStyle("flow node 4"),
					this.skin.FindStyle("flow node 5")
					
				};
				
				this.boxSelected = this.skin.FindStyle("flow node 5");
				#endif

			}
开发者ID:zhaoluxyz,项目名称:Unity3d.UI.Windows,代码行数:29,代码来源:WindowLayoutStyles.cs


示例6: Start

	void Start()
	{
		isShow = false;
		addMeshCollider = true;
		ui = (GUISkin) Resources.Load("uteForEditor/uteUI");
		isCombineMesh = true;
	}
开发者ID:gato0429,项目名称:GlobalGame2016,代码行数:7,代码来源:uteExporter.cs


示例7: OnEnable

    GameObject targetGameObject; // The GameObject that this editor uses

    #endregion Fields

    #region Methods

    void OnEnable()
    {
        this.editorSkin = (GUISkin)(Resources.LoadAssetAtPath("Assets/Editor/EditorGUISkin.guiskin", typeof(GUISkin)));

        this.scriptOfOurType = (ProceduralRing)target;
        this.targetGameObject = (GameObject)this.scriptOfOurType.gameObject;
    }
开发者ID:SuperStarPL,项目名称:Radius,代码行数:13,代码来源:ProceduralCylinderLabel.cs


示例8: setTopRightPosition

 public void setTopRightPosition(int x, int y, GUISkin skin)
 {
     setStyle(skin,config.styleName,out config.style);
     config.top = y;
     config.right = x;
     recalculatePositions();
 }
开发者ID:happyjiahan,项目名称:colorus,代码行数:7,代码来源:ColorHistory.cs


示例9: Init

        static public void Init()
        {
            init = true;
            window = (EditorPlusShortcuts)EditorWindow.GetWindow(typeof(EditorPlusShortcuts));
            window.title = "Shortcuts";
            window.minSize = new Vector2(StartMargin.x + ButtonSize.x + ButtonMargin.x, StartMargin.y + ButtonSize.y + ButtonMargin.y);

            widgetHost = new WidgetHost(window.position, StartMargin, ButtonMargin, ButtonSize, 0, 1f, true);

            ShortcutsSkinEdit = AssetDatabase.LoadMainAssetAtPath(EditorPlus.PlusPath + "UnityPlusSkinShortcutsEdit.guiskin") as GUISkin;

            if (Shortcuts == null)
                Shortcuts = new List<string>();

            if (ShortcutsDefaults == null)
                ShortcutsDefaults = new List<string>();

            if (ShortcutsCustoms == null)
                ShortcutsCustoms = new List<string>();

            SaveDefaults();

#if EPlus_5
            SaveDefaultsUI();
#endif

            LoadAllSaves();
            LoadResources();

            EditorPlus.OnSkinSwitched += LoadResources;
        }
开发者ID:PramgaOnce,项目名称:GlobalGameJam2016,代码行数:31,代码来源:EditorPlusShortcuts.cs


示例10: OnEnable

        public void OnEnable()
        {
            font_atlas_prop = serializedObject.FindProperty("atlas");
            font_material_prop = serializedObject.FindProperty("material");
            font_normalStyle_prop = serializedObject.FindProperty("NormalStyle");
            font_boldStyle_prop = serializedObject.FindProperty("BoldStyle");
            font_italicStyle_prop = serializedObject.FindProperty("ItalicStyle");

            m_fontInfo_prop = serializedObject.FindProperty("m_fontInfo");
            m_glyphInfoList_prop = serializedObject.FindProperty("m_glyphInfoList");
            m_kerningInfo_prop = serializedObject.FindProperty("m_kerningInfo");
            m_kerningPair_prop = serializedObject.FindProperty("m_kerningPair");

            //m_isGlyphInfoListExpanded_prop = serializedObject.FindProperty("isGlyphInfoListExpanded");
            //m_isKerningTableExpanded_prop = serializedObject.FindProperty("isKerningTableExpanded");

            m_fontAsset = target as TextMeshProFont;
            m_kerningTable = m_fontAsset.kerningInfo;

            // Find to location of the TextMesh Pro Asset Folder (as users may have moved it)
            string tmproAssetFolderPath = TMPro_EditorUtility.GetAssetLocation();      

            // GUI Skin 
            if (EditorGUIUtility.isProSkin)
                mySkin = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/GUISkins/TMPro_DarkSkin.guiskin", typeof(GUISkin)) as GUISkin;
            else
                mySkin = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/GUISkins/TMPro_LightSkin.guiskin", typeof(GUISkin)) as GUISkin;

            if (mySkin != null)
            {
                SectionLabel = mySkin.FindStyle("Section Label");
                GroupLabel = mySkin.FindStyle("Group Label");
                SquareAreaBox85G = mySkin.FindStyle("Square Area Box (85 Grey)");
            }
        }
开发者ID:koko11,项目名称:MatrixVR,代码行数:35,代码来源:TMPro_FontEditor.cs


示例11: ArmorEditor

    public ArmorEditor(GUISkin guiSkin, MainWindowEditor data)
    {
        EditorName = "Armor";

        Init(guiSkin, data);
        LoadData();
    }
开发者ID:reaganq,项目名称:mixabots,代码行数:7,代码来源:ArmorEditor.cs


示例12: Styles

			public Styles() {
				
				this.skin = Resources.Load<GUISkin>("UI.Windows/Core/Styles/" + (EditorGUIUtility.isProSkin == true ? "SkinDark" : "SkinLight"));
				this.transitionA = this.skin.FindStyle("TransitionA");
				this.transitionB = this.skin.FindStyle("TransitionB");

			}
开发者ID:puckery,项目名称:Unity3d.UI.Windows,代码行数:7,代码来源:TransitionInputTemplateParametersEditor.cs


示例13: SettingsMenuWrapper

 public SettingsMenuWrapper(mod.Mod mod, float initialMultiplier)
 {
     _settingsSkin = (GUISkin)Resources.Load("_GUISkins/Settings");
     _regularUI = (GUISkin)Resources.Load("_GUISkins/RegularUI");
     _mod = mod;
     _multiplier = initialMultiplier;
 }
开发者ID:jsbannis,项目名称:AnimationControl,代码行数:7,代码来源:SettingsMenuWrapper.cs


示例14: Start

    // Use this for initialization
    void Start()
    {
         titleSkin = (GUISkin)Resources.Load("TimerGUISkin");
         titleGraphic = (Texture2D)Resources.Load("Title-Logo");

         gameManager = GetComponent<GameManager>();
    }
开发者ID:lenny99,项目名称:unity3d-witchtraining,代码行数:8,代码来源:TitleScreen.cs


示例15: ItemEditor

	public ItemEditor(GUISkin guiSkin, MainWindowEditor data)
	{
		EditorName = "Item";
		
		Init(guiSkin, data);
		LoadData();
	}
开发者ID:reaganq,项目名称:MagnetBots_unity,代码行数:7,代码来源:ItemEditor.cs


示例16: Start

    // Use this for initialization
    void Start()
    {
        skin1 = Resources.Load("Menu/Menu") as GUISkin;

        // rect De la fenetre principale, poura fficher l'image de fond et le texte principal
        rectMenu = new Rect(4 * Screen.width / 5 , 2* Screen.height / 3, 400, 100);

        //rect du 1er bouton
        boutonJouer = gameObject.AddComponent<ButtonWithTooltip>();
        boutonJouer.init("> Jouer", "Cliquez pour jouer !", new Rect(50,  Screen.height / 4, 200, 50), 1500);

        boutonOptions = gameObject.AddComponent<ButtonWithTooltip>();
        boutonOptions.init("> Options", "Options", new Rect(50, 2 * Screen.height / 4, 200, 50), 1500);

        boutonQuitter = gameObject.AddComponent<ButtonWithTooltip>();
        boutonQuitter.init("> Quitter", "Retour sur le bureau", new Rect(50, 3 * Screen.height / 4, 200, 50), 1500);

        /*
        *   Sous menu options :
        */
        boutonOptionsGraphiques = gameObject.AddComponent<ButtonWithTooltip>();
        boutonOptionsGraphiques.init("> Options graphiques", "No tooltuip", new Rect(50 + Screen.width/3, Screen.height / 4, 400, 50), 1500);
        boutonOptionsGraphiques.setDisplayed(true);

        boutonOptionsAudios = gameObject.AddComponent<ButtonWithTooltip>();
        boutonOptionsAudios.init("> Options audios   ", "No tooltuip", new Rect(50 + Screen.width / 3, Screen.height / 3, 400, 50), 1500);
        boutonOptionsAudios.setDisplayed(true);
    }
开发者ID:BearWarrior,项目名称:2D,代码行数:29,代码来源:Menu.cs


示例17: PlayState1

				public PlayState1 (StateManager managerRef)
				{ //Constructor
						manager = managerRef;
						Debug.Log ("Constructing PlayState1 from Xamarin");

						"Stage1".LoadScene ();
						//if (Application.loadedLevelName != "Stage1")
						//		Application.LoadLevel ("Stage1");
	
						//StaticMethods.SetActive ("Player", manager.gameDataRef.activeObjects); //Set Player active, setOneActive method
						StaticMethods.SetActive ("Darkness_Layer", manager.gameDataRef.activeObjects); 
						StaticMethods.SetOneActive ("Following Camera", manager.gameDataRef.cameras); //Camera that follows the Player, setOneActive method
						//"Following Camera".SetOneActive (manager.gameDataRef.cameras);
						//setManyActive (managerRef.gameDataRef.GUIObjects); //Set all GUI elements active, setActive method

						player = GameObject.FindGameObjectWithTag ("Player"); //the Player GameObject is now active and can be found
						player.GetComponent<Rigidbody2D> ().isKinematic = false; //Player is now affected by physics
						 
						player.transform.SetPositionXY (-5.8f, -0.4f); //set starting position for Player
						player.transform.SetLocalScale (0.3f, 0.3f, 1f); //Set initial scale

						skin = Resources.Load ("GUISkin") as GUISkin;

						/*	if (GameObject.Find ("Platform")) {
								Debug.Log ("platform");
								//platform = GameObject.Find ("Platform");
						} else
								Debug.Log ("no platform");
*/

						//darkness.GetComponent<Renderer>().material.color.a;
						//Color dark = darkness.renderer.material.color;
						//dark.a -= 0;
						//darkness.renderer.material.color = color;
				}
开发者ID:katerinakat,项目名称:Platform_Game,代码行数:35,代码来源:PlayState1.cs


示例18: Start

 void Start()
 {
     // Load a skin for the buttons
     skin = Resources.Load("GUISkin") as GUISkin;
     skin.label.fontSize = 32 * Screen.width / 800;
     //skin.label.alignment = TextAnchor.UpperCenter;
 }
开发者ID:jeevnayak,项目名称:amoeba,代码行数:7,代码来源:GameOverScript.cs


示例19: OnGUI

        void OnGUI()
        {
            if (skin == null)
                skin = new GUISkin();

            GUILayout.Box("Build Project Tool By Zhang Shining Publish at 2014-1-11", skin.FindStyle("Box"), GUILayout.ExpandWidth(true));

            PackageInfo();

            if (mFlatform == null)
			{
				GetPaltform(thisWindow);
                return;
			}
            
            mFlatform.Setting();

//			GUILayout.Space(10);

			if (mFlatform != null)
				mFlatform.Draw();
			
			if (GUILayout.Button("Build", GUILayout.ExpandWidth(true)))
            {
                BuildCommon();
            }

            PackageScene();

        }
开发者ID:seenen,项目名称:HerosTechBak_Seenen,代码行数:30,代码来源:BPWindow.cs


示例20: PrintStyles

		private static void PrintStyles(GUISkin skin)
		{
			EditorGUILayout.BeginVertical();
			foreach (GUIStyle style in skin.customStyles)
			{
				GUILayout.BeginHorizontal();

				GUILayout.Label("[" + style.fixedWidth + "," + style.fixedHeight + "] " + style.name, GUILayout.MinWidth(200),
								GUILayout.Width(200), GUILayout.MaxHeight(s_Height));

				GUILayout.Label(s_Text, style, GUILayout.MaxWidth(s_Width), GUILayout.MaxHeight(s_Height));

				GUILayout.Space(150 - s_Width);

				GUILayout.Button(s_Text, style, GUILayout.MaxWidth(s_Width), GUILayout.MaxHeight(s_Height));

				GUILayout.Space(150 - s_Width);

				EditorGUILayout.TextField(s_Text, style, GUILayout.MaxWidth(s_Width), GUILayout.MaxHeight(s_Height));

				GUILayout.Space(150 - s_Width);

				s_IsSelected = GUILayout.Toggle(s_IsSelected, s_Text, style, GUILayout.MaxWidth(s_Width),
												GUILayout.MaxHeight(s_Height));

				GUILayout.Space(150 - s_Width);

				EditorGUILayout.EndHorizontal();
			}
			EditorGUILayout.EndVertical();
		}
开发者ID:JustJessTV,项目名称:GitMergeTest,代码行数:31,代码来源:ShowEditorStyles.cs



注:本文中的UnityEngine.GUISkin类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UnityEngine.GUIStyle类代码示例发布时间:2022-05-26
下一篇:
C# UnityEngine.GUILayoutOption类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap