Skip to content

Commit c72ed4f

Browse files
authored
Update README.md
1 parent b1029c1 commit c72ed4f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ Load Scriptable Objects via code
44
## Usage
55

66
### Creating ScriptableObject:
7+
Your ```ScriptableObject``` must implement ```ILoadable``` interface.
78

89
```csharp
910
[CreateAssetMenu(menuName = "Game/Configs/Player")]
10-
public class PlayerConfig : ScriptableObject
11+
public class PlayerConfig : ScriptableObject, ILoadable
1112
{
1213
[SerializeField] private float _startHealth = 100f;
1314

1415
public float StartHealth => _startHealth;
1516
}
1617
```
1718

18-
Now you need to create an asset and put it in Resources folder
19+
Now you need to create an asset.
1920

2021
### Get Data from ScriptableObject:
2122

2223
```csharp
24+
using ToolBox.Loader;
25+
2326
public class Player : MonoBehaviour
2427
{
2528
private float _health = 0f;

0 commit comments

Comments
 (0)