Skip to content

Commit 0096d2a

Browse files
author
Cory Leach
committed
Version Bump
Added and Updated RuntimeSet interface.
1 parent ee1db49 commit 0096d2a

File tree

5 files changed

+37
-21
lines changed

5 files changed

+37
-21
lines changed

README.md

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
1-
<h1 align="center">Welcome to com.gameframe.scriptableobjects 👋</h1>
1+
<h1 align="center">Gameframe.ScriptableObjects 👋</h1>
22
<p>
3-
<img alt="Version" src="https://img.shields.io/badge/version-1.0.3-blue.svg?cacheSeconds=2592000" />
4-
<a href="https://twitter.com/coryleach">
3+
<img alt="Version" src="https://img.shields.io/badge/version-1.1.0-blue.svg?cacheSeconds=2592000" />
4+
<a href="https://twitter.com/Cory Leach">
55
<img alt="Twitter: coryleach" src="https://img.shields.io/twitter/follow/coryleach.svg?style=social" target="_blank" />
66
</a>
77
</p>
88

9-
> Library of ScriptableObject types for Unity:</br>
9+
Library of scriptable object types
1010

11-
> <b>RuntimeSets</b></br>
12-
> GameObjects can add themselves to RuntimeSet assets at runtime to quickly get sets of GameObjects</br>
11+
## Quick Package Install
1312

14-
> <b>Variables</b></br>
15-
> Use scriptable objects to share variable instances between objects. Subscribe for value change events.</br>
13+
#### Using UnityPackageManager (for Unity 2019.3 or later)
14+
Open the package manager window (menu: Window > Package Manager)<br/>
15+
Select "Add package from git URL...", fill in the pop-up with the following link:<br/>
16+
https://github.com/coryleach/RepositoryName.git#1.1.0<br/>
1617

17-
> <b>GameEvents</b></br>
18-
> Hook up events between scenes and prefabs using scriptable objects as game events</br>
19-
20-
## Quick Package Install
21-
22-
#### Using UnityPackageManager (for Unity 2018.3 or later)
18+
#### Using UnityPackageManager (for Unity 2019.1 or later)
2319

2420
Find the manifest.json file in the Packages folder of your project and edit it to look like this:
2521
```js
2622
{
2723
"dependencies": {
28-
"com.gameframe.scriptableobjects": "https://github.com/coryleach/UnityScriptableObjects.git#1.0.3",
24+
"com.gameframe.scriptableobjects": "https://github.com/coryleach/RepositoryName.git#1.1.0",
2925
...
3026
},
3127
}
3228
```
3329

30+
<!-- DOC-START --><!-- DOC-END -->
31+
3432
## Author
3533

3634
👤 **Cory Leach**
3735

3836
* Twitter: [@coryleach](https://twitter.com/coryleach)
3937
* Github: [@coryleach](https://github.com/coryleach)
4038

39+
4140
## Show your support
4241

4342
Give a ⭐️ if this project helped you!
4443

4544
***
46-
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
45+
_This README was generated with ❤️ by [Gameframe.Packages](https://github.com/coryleach/unitypackages)_

Runtime/RuntimeSets/IRuntimeSet.cs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Collections.Generic;
2+
using UnityEngine.Events;
3+
4+
namespace Gameframe.ScriptableObjects.RuntimeSets
5+
{
6+
public interface IRuntimeSet<T>
7+
{
8+
IReadOnlyList<T> Items { get; }
9+
UnityEvent<T> OnAdded { get; }
10+
UnityEvent<T> OnRemoved { get; }
11+
void Add(T t);
12+
void Remove(T t);
13+
}
14+
}

Runtime/RuntimeSets/IRuntimeSet.cs.meta

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/RuntimeSets/RuntimeSet.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
namespace Gameframe.ScriptableObjects.RuntimeSets
66
{
7-
public class RuntimeSet<T> : ScriptableObject
7+
public class RuntimeSet<T> : ScriptableObject, IRuntimeSet<T>
88
{
99
public class RuntimeSetChangeEvent : UnityEvent<T> {}
1010

1111
private readonly List<T> _items = new List<T>();
1212
public IReadOnlyList<T> Items => _items;
1313

14-
public RuntimeSetChangeEvent OnAdded { get; } = new RuntimeSetChangeEvent();
15-
public RuntimeSetChangeEvent OnRemoved { get; } = new RuntimeSetChangeEvent();
14+
public UnityEvent<T> OnAdded { get; } = new RuntimeSetChangeEvent();
15+
public UnityEvent<T> OnRemoved { get; } = new RuntimeSetChangeEvent();
1616

1717
public void Add(T t)
1818
{

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "com.gameframe.scriptableobjects",
33
"displayName": "Gameframe.ScriptableObjects",
4-
"version": "1.0.3",
4+
"version": "1.1.0",
55
"author": {
66
"name": "Cory Leach",
77
"email": "cory.leach@gmail.com",
88
"url": "https://coryleach.info"
99
},
1010
"description": "Library of scriptable object types"
11-
}
11+
}

0 commit comments

Comments
 (0)