Example #1
0
    void SetQuickBarShortcut(SceneObject sceneObject, int index, Texture texture)
    {
        OnQuickBarAdd?.Invoke(sceneObject, index);

        if (index >= shortcutsImgs.Length)
        {
            return;
        }

        shortcutsImgs[index].SetTexture(texture);
    }
Example #2
0
    private void SetQuickBarShortcut(CatalogItem catalogItem, int index, Texture texture)
    {
        OnQuickBarAdd?.Invoke(catalogItem, index);

        if (index >= shortcutsImgs.Length)
        {
            return;
        }

        if (shortcutsImgs[index] != null && texture != null)
        {
            shortcutsImgs[index].SetTexture(texture);
        }
    }