-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
What is the addition?
New ways of creating RelicData
objects.
Why?
Due to RelicData
inheriting from UnityEngine.ScriptableObject
, calling its constructor is impossible.
RelicData CustomData = new RelicData( /* parameters here... */ ); // Errors, impossible to compile
// User needs to do this:
RelicData CustomData = ScriptableObject.CreateInstance<RelicData>();
CustomData.Name = "...";
CustomData.Rarity = ...;
CustomData.MaxStack = ...;
// and so on...
Example of the usage
RelicData CustomData;
CustomData = new Relics.Data() {
Name = "...",
Rarity = ...,
MaxStack = ...,
// and so on...
};
CustomData = new Relics.Data("Name", rarity, maxStack, ...);
CustomData = Relics.DataFromJson(jsonString);
CustomData = Relics.DataFromJson(pathToJson);
int ID = Relics.Register(CustomData, textureSmall, textureBig);
Metadata
Metadata
Assignees
Labels
additionAddition suggestionAddition suggestion