本文整理汇总了C#中UnityEngine.GUISkin类的典型用法代码示例。如果您正苦于以下问题:C# GUISkin类的具体用法?C# GUISkin怎么用?C# GUISkin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GUISkin类属于UnityEngine命名空间,在下文中一共展示了GUISkin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: Awake
void Awake()
{
this.skin = Resources.Load <GUISkin>(GuiSkinLocation);
this.recorder = GetComponent<RecordingManaging>();
this.InitLogo();
DontDestroyOnLoad(this.gameObject);
}
示例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"); }
}
示例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;
}
示例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
}
示例6: Start
void Start()
{
isShow = false;
addMeshCollider = true;
ui = (GUISkin) Resources.Load("uteForEditor/uteUI");
isCombineMesh = true;
}
示例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;
}
示例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();
}
示例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;
}
示例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)");
}
}
示例11: ArmorEditor
public ArmorEditor(GUISkin guiSkin, MainWindowEditor data)
{
EditorName = "Armor";
Init(guiSkin, data);
LoadData();
}
示例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");
}
示例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;
}
示例14: Start
// Use this for initialization
void Start()
{
titleSkin = (GUISkin)Resources.Load("TimerGUISkin");
titleGraphic = (Texture2D)Resources.Load("Title-Logo");
gameManager = GetComponent<GameManager>();
}
示例15: ItemEditor
public ItemEditor(GUISkin guiSkin, MainWindowEditor data)
{
EditorName = "Item";
Init(guiSkin, data);
LoadData();
}