Highlight
How do I use Highlight
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
File name: PhotonEditor.cs
Copy
543 protected virtual void OnGuiMainWizard()
544 {
545 GUILayout.BeginHorizontal();
546 GUILayout.FlexibleSpace();
547 GUILayout.Label(WizardIcon);
548 GUILayout.FlexibleSpace();
549 GUILayout.EndHorizontal();
550
551 EditorGUILayout.Separator();
552
553 GUILayout.Label(CurrentLang.PUNWizardLabel, EditorStyles.boldLabel);
554 if (isPunPlus)
555 {
556 GUILayout.Label(CurrentLang.MobilePunPlusExportNoteLabel);
557 }
558 else if (!InternalEditorUtility.HasAdvancedLicenseOnBuildTarget(BuildTarget.Android) || !InternalEditorUtility.HasAdvancedLicenseOnBuildTarget(BuildTarget.iOS))
559 {
560 GUILayout.Label(CurrentLang.MobileExportNoteLabel);
561 }
562 EditorGUILayout.Separator();
563
564
565 // settings button
566 GUILayout.BeginHorizontal();
567 GUILayout.Label(CurrentLang.SettingsButton, EditorStyles.boldLabel, GUILayout.Width(100));
568 if (GUILayout.Button(new GUIContent(CurrentLang.SetupButton, CurrentLang.SetupServerCloudLabel)))
569 {
570 this.InitPhotonSetupWindow();
571 }
572
573 GUILayout.EndHorizontal();
574 EditorGUILayout.Separator();
575
576
577 // find / select settings asset
578 GUILayout.BeginHorizontal();
579 GUILayout.Label(CurrentLang.SettingsFileLabel, EditorStyles.boldLabel, GUILayout.Width(100));
580 if (GUILayout.Button(new GUIContent(CurrentLang.LocateSettingsButton, CurrentLang.SettingsHighlightLabel)))
581 {
582 EditorGUIUtility.PingObject(PhotonEditor.Current);
583 }
584
585 GUILayout.EndHorizontal();
586
587
588 GUILayout.FlexibleSpace();
589
590 // converter
591 GUILayout.BeginHorizontal();
592 GUILayout.Label(CurrentLang.ConverterLabel, EditorStyles.boldLabel, GUILayout.Width(100));
593 if (GUILayout.Button(new GUIContent(CurrentLang.StartButton, CurrentLang.UNtoPUNLabel)))
594 {
595 PhotonConverter.RunConversion();
596 }
597
598 GUILayout.EndHorizontal();
599 EditorGUILayout.Separator();
600
601
602 // documentation
603 GUILayout.BeginHorizontal();
604 GUILayout.Label(CurrentLang.DocumentationLabel, EditorStyles.boldLabel, GUILayout.Width(100));
605 GUILayout.BeginVertical();
606 if (GUILayout.Button(new GUIContent(CurrentLang.OpenPDFText, CurrentLang.OpenPDFTooltip)))
607 {
608 EditorUtility.OpenWithDefaultApp(DocumentationLocation);
609 }
610
611 if (GUILayout.Button(new GUIContent(CurrentLang.OpenDevNetText, CurrentLang.OpenDevNetTooltip)))
612 {
613 EditorUtility.OpenWithDefaultApp(UrlDevNet);
614 }
615
616 if (GUILayout.Button(new GUIContent(CurrentLang.OpenCloudDashboardText, CurrentLang.OpenCloudDashboardTooltip)))
617 {
618 EditorUtility.OpenWithDefaultApp(UrlCloudDashboard + Uri.EscapeUriString(this.emailAddress));
619 }
620
621 if (GUILayout.Button(new GUIContent(CurrentLang.OpenForumText, CurrentLang.OpenForumTooltip)))
622 {
623 EditorUtility.OpenWithDefaultApp(UrlForum);
624 }
625
626 GUILayout.EndVertical();
627 GUILayout.EndHorizontal();
628 }
File name: Node.cs
Copy
35 public void HighlightMove() {
36 if (renderer.sharedMaterial != origMaterial) return;
37 SetMaterial(GameManager.Instance.HighlightMoveMaterial);
38 }
File name: Node.cs
Copy
40 public void HighlightEat() {
41 if (renderer.sharedMaterial != origMaterial) return;
42 SetMaterial(GameManager.Instance.HighlightEatMaterial);
43 }
File name: Node.cs
Copy
45 public void HighlightCheck() {
46 if (renderer.sharedMaterial != origMaterial) return;
47 SetMaterial(GameManager.Instance.HighlightCheckMaterial);
48 }
File name: Node.cs
Copy
50 public void UnhighlightMove() {
51 Unhiglight(GameManager.Instance.HighlightMoveMaterial);
52 }
File name: Node.cs
Copy
54 public void UnhighlightEat() {
55 Unhiglight(GameManager.Instance.HighlightEatMaterial);
56 }
File name: Node.cs
Copy
58 public void UnhighlightCheck() {
59 Unhiglight(GameManager.Instance.HighlightCheckMaterial);
60 }
File name: GameManager.cs
Copy
70 public Material HighlightCheckMaterial {
71 get {return highlightCheckMaterial;}
72 }
File name: GameManager.cs
Copy
74 public Material HighlightEatMaterial {
75 get {return highlightEatMaterial;}
76 }
File name: GameManager.cs
Copy
78 public Color PieceHighlightColor {
79 get {return pieceHighlightColor;}
80 }
Download file with original file name:Highlight
Highlight 106 lượt xem
Gõ tìm kiếm nhanh...