Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Thundernerd/Unity3D-ScriptingDefineUtility
a small helper that allows you to more easily modify the scripting define symbols for your project
https://github.com/Thundernerd/Unity3D-ScriptingDefineUtility
Last synced: 3 months ago
JSON representation
a small helper that allows you to more easily modify the scripting define symbols for your project
- Host: GitHub
- URL: https://github.com/Thundernerd/Unity3D-ScriptingDefineUtility
- Owner: Thundernerd
- License: mit
- Created: 2020-10-18T10:42:36.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-22T08:20:50.000Z (over 3 years ago)
- Last Synced: 2024-05-15T14:19:35.857Z (6 months ago)
- Language: C#
- Homepage:
- Size: 10.7 KB
- Stars: 15
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Scripting Define Utility
Scripting Define Utility is a small helper that allows you to more easily modify the scripting define symbols for your project.
## Installation
1. The package is available on the [openupm registry](https://openupm.com). You can install it via [openupm-cli](https://github.com/openupm/openupm-cli).
```
openupm add net.tnrd.scriptingdefineutility
```
2. Installing through a [Unity Package](http://package-installer.glitch.me/v1/installer/package.openupm.com/net.tnrd.scriptingdefineutility?registry=https://package.openupm.com) created by the [Package Installer Creator](https://package-installer.glitch.me) from [Needle](https://needle.tools)[](http://package-installer.glitch.me/v1/installer/package.openupm.com/net.tnrd.scriptingdefineutility?registry=https://package.openupm.com)
## Usage
There's a couple of interactions you can do with the ScriptingDefineUtility#### Adding
Adding a new define symbol to the list```csharp
private void Foo()
{
ScriptingDefineUtility.Add("Bar");
}
```#### Removing
Removing an existing define symbol from the list```csharp
private void Foo()
{
ScriptingDefineUtility.Remove("Bar");
}
```#### Contains
Checking if a symbol is in the current symbols list```csharp
private void Foo()
{
if (ScriptingDefineUtility.Contains("Bar"))
{
...
}
}
```#### Getting
There are two ways of getting all the define symbolsThis returns all the symbols as stored in the settings.
```csharp
private void Foo()
{
string symbols = ScriptingDefineUtility.GetSymbols();
}
```This returns all the symbols split by the delimiter ; (semicolon) and returns it as a string array
```csharp
private void Foo()
{
string[] symbols = ScriptingDefineUtility.Symbols;
}
```## Support
**Scripting Define Utility** is a small and open-source utility that I hope helps other people. It is by no means necessary but if you feel generous you can support me by donating.[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J11GEYY)
## Contributing
Pull requests are welcomed. Please feel free to fix any issues you find, or add new features.