We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1029c1 commit c72ed4fCopy full SHA for c72ed4f
1 file changed
README.md
@@ -4,22 +4,25 @@ Load Scriptable Objects via code
4
## Usage
5
6
### Creating ScriptableObject:
7
+Your ```ScriptableObject``` must implement ```ILoadable``` interface.
8
9
```csharp
10
[CreateAssetMenu(menuName = "Game/Configs/Player")]
- public class PlayerConfig : ScriptableObject
11
+ public class PlayerConfig : ScriptableObject, ILoadable
12
{
13
[SerializeField] private float _startHealth = 100f;
14
15
public float StartHealth => _startHealth;
16
}
17
```
18
-Now you need to create an asset and put it in Resources folder
19
+Now you need to create an asset.
20
21
### Get Data from ScriptableObject:
22
23
24
+using ToolBox.Loader;
25
+
26
public class Player : MonoBehaviour
27
28
private float _health = 0f;
0 commit comments