Skip to content

Commit d09579a

Browse files
authored
Update README.md
1 parent 2455170 commit d09579a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ Load Scriptable Objects via code
77
Your ```ScriptableObject``` must implement ```ILoadable``` interface.
88

99
```csharp
10-
[CreateAssetMenu(menuName = "Game/Configs/Player")]
11-
public class PlayerConfig : ScriptableObject, ILoadable
12-
{
13-
[SerializeField] private float _startHealth = 100f;
10+
using ToolBox.Loader;
11+
using UnityEngine;
1412

15-
public float StartHealth => _startHealth;
16-
}
13+
[CreateAssetMenu(menuName = "Game/Configs/Player")]
14+
public class PlayerConfig : ScriptableObject, ILoadable
15+
{
16+
[SerializeField] private float _startHealth = 100f;
17+
18+
public float StartHealth => _startHealth;
19+
}
1720
```
1821

1922
Now you need to create an asset.

0 commit comments

Comments
 (0)