/// <summary> /// Initialise the tool. /// Called by unity when the tool is created. /// </summary> protected override void Awake() { base.Awake(); lightCursor = TextureUtils.LoadCursor("bob_cursor_light.png"); darkCursor = TextureUtils.LoadCursor("bob_cursor_dark.png"); m_cursor = darkCursor; }
/// <summary> /// Initialise the tool. /// Called by unity when the tool is created. /// </summary> protected override void Awake() { base.Awake(); // Initializae PropAPI. PropAPI.Initialize(); // Load cursors. lightCursor = TextureUtils.LoadCursor("BOB-CursorLight.png"); darkCursor = TextureUtils.LoadCursor("BOB-CursorDark.png"); m_cursor = darkCursor; // Create new UUI button. UIComponent uuiButton = UUIHelpers.RegisterToolButton( name: nameof(BOBTool), groupName: null, // default group tooltip: Translations.Translate("BOB_NAM"), tool: this, icon: UUIHelpers.LoadTexture(UUIHelpers.GetFullPath <BOBMod>("Resources", "BOB-UUI.png")) //hotkeys: new UUIHotKeys { ActivationKey = ModSettings.PanelSavedKey } ); }