I need to be able to load my game with a different set of assets, basically reskinning it.

I knew beforehand that I would need a way to do that in the future so right now i'm accessing my assets via a ScriptableObject that I call an "Accessor".

Basically the accessor only hold references to the assets and when I want to get, for example, the sprite for my cards I make a call that looks like that :

Sprite cardSprite = Accessors.Instance.GetCardFrame();

Solution seem simple, I add a layer above the accessors that allow it to choose between differents sets of references.

The problem is that right now I only use the accessors for dynamically generated gameobject ( When I instantiate a card for exemple ). How could I do that with, let's say, UI in the editor ? It will be nearly impossible to work on the UI if I can't see it due to the sprite not being loaded in editor mode.

  • 1
    \$\begingroup\$ This sounds like a subject Asset Bundle Variants may be able to help with, though I don't have enough experience with them myself to offer a full solution. \$\endgroup\$ – DMGregory Nov 6 '17 at 12:38
  • \$\begingroup\$ @DMGregory I knew about Asset Bundle but not about Asset Bundle Variants. I will have a look into it and post an answer if it solves my problem. \$\endgroup\$ – dnotol Nov 6 '17 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.