Search Unity

Correct way to write a custom build script?

Discussion in 'Addressables' started by TrueNoob141, Nov 10, 2020.

  1. TrueNoob141

    TrueNoob141

    Joined:
    Sep 18, 2019
    Posts:
    30
    I want to create a custom script in which JSON will be collected from ScriptableObject by groups. I have no problems with serialization by groups, but addressable BuildScript is very difficult and I don't understand how to create a Content Catalog. How to do it?

    Example:
    Code (CSharp):
    1. public class CustomSO : ScriptableObject
    2. {
    3.     public string displayName;
    4.     public int health;
    5.     public int maxHealth;
    6. }
    Code (CSharp):
    1. [
    2.   {
    3.     "displayName": "Hello, world",
    4.     "health": 50,
    5.     "maxHalth": 100
    6.   },
    7.   {
    8.     "displayName": "Greatings",
    9.     "health": 150,
    10.     "maxHalth": 150
    11.   }
    12. ]