Пример #1
0
        /// <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 }
                );
        }