https://github.com/somedeveloper00/singletonscriptableobject
Unity package for singleton Scriptable Object using source generators
https://github.com/somedeveloper00/singletonscriptableobject
singleton singleton-pattern unity unity3d unity3d-plugin upm upm-package
Last synced: 8 months ago
JSON representation
Unity package for singleton Scriptable Object using source generators
- Host: GitHub
- URL: https://github.com/somedeveloper00/singletonscriptableobject
- Owner: somedeveloper00
- License: mit
- Created: 2023-08-24T17:54:14.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-03T12:55:54.000Z (about 2 years ago)
- Last Synced: 2025-01-31T03:37:56.515Z (8 months ago)
- Topics: singleton, singleton-pattern, unity, unity3d, unity3d-plugin, upm, upm-package
- Language: C#
- Homepage:
- Size: 38.1 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Singleton Scriptable Object
### βοΈ All You Have To Do is- `partial class MyClass : SingletonScriptableObject { }`
### πAnd You'll Get To:
1. Access it by `MyClass.Instance`
2. Edit it from inspector at *Assets/Resources/SingletonSOs/MyClass*

3. Select the instance by toolbar buttons at *'Tools/Singleton Scriptable Objects/Select 'MyClass'*
That's it! The rest is source generated and handled automatically!
The goal of this project is to provide a singleton scriptable object solution that has the easiest usage APIs and doesn't get in the way of your workflow.
## π Extra
* You can find the source gen project at [here](https://github.com/somedeveloper00/UnityModelViewAnalyzer.git).
* Renaming type names are **totally supported!**
* Exchanging two types' names is **totally supported!**## βοΈ Install
### UPM
You can install this as a unity package by following the instructions at [the official manual](https://docs.unity3d.com/Manual/upm-ui-giturl.html).
> The package url is `https://github.com/somedeveloper00/SingletonScriptableObject.git`### Git Submodule
clone the repository into your project's Assets/Plugins folder as a submodule:
```bash
git submodule add --force https://github.com/somedeveloper00/SingletonScriptableObject/ Assets/Plugins/SingletonScriptableObject
git submodule update Assets/Plugins/SingletonScriptableObject
```
or if you don't have git, simply download the zip and extract it into your project's Assets/Plugins folder:
> Linux / MacOS
> ```
> wget https://github.com/somedeveloper00/SingletonScriptableObject/archive/refs/heads/main.zip -O SingletonScriptableObject.zip
> unzip SingletonScriptableObject.zip -d Assets/Plugins
> rm SingletonScriptableObject.zip## π Support
If you like my work, you can buy me a coffee to keep me motivated to work on this project and other projects like this.
My wallet addresses are:
* BTC: `bc1q808ykgvhn2ewtx09n3kdhnlmcnc6xqwxa0hnys`
* ETH: `0xCe7028266Cf3eF0E63437d0604511e30f8e4B4Af`
* LTC: `ltc1qlu2jahcdr5kqf5dp9xt3zr3cv66gm2p8hmnz9j`## π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.