Search Unity

Question Performance Issue: Load from Resources x Load from ScriptableObject

Discussion in 'Editor & General Support' started by Stader, Sep 3, 2021.

  1. Stader

    Stader

    Joined:
    Jun 8, 2018
    Posts:
    15
    Hi guys, I have a question about the best way to save resources and increase the performance of my game.

    Basically it's a game with several pieces that go back and forth from a pool, and each time I call, I configure its appearance based on a list that tells me which skin is for the next piece (there are 8 different skins).

    I have a class that gives me the basic information of the piece, but I don't know if I'd better include the material directly in the class, or call it along the Resources.Load(path)

    Code (CSharp):
    1. symbolDissolve = Resources.Load<Material>("Themes/" + GameManager.Instance.selectedTheme.path + "/Materials/Dissolve/Symbol");
    Code (CSharp):
    1. symbolDissolve = piece.SymbolMaterial;