{"id":21512046,"url":"https://github.com/strvcom/rxscriptablevariables-unity","last_synced_at":"2025-03-17T15:26:07.190Z","repository":{"id":97728007,"uuid":"140321630","full_name":"strvcom/rxscriptablevariables-unity","owner":"strvcom","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-05T07:04:17.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-24T01:43:41.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strvcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-09T17:44:24.000Z","updated_at":"2019-12-05T07:04:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"c265ce7f-ae68-458c-a42d-1d257b7f2581","html_url":"https://github.com/strvcom/rxscriptablevariables-unity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Frxscriptablevariables-unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Frxscriptablevariables-unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Frxscriptablevariables-unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strvcom%2Frxscriptablevariables-unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strvcom","download_url":"https://codeload.github.com/strvcom/rxscriptablevariables-unity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056772,"owners_count":20390786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T22:25:43.637Z","updated_at":"2025-03-17T15:26:07.168Z","avatar_url":"https://github.com/strvcom.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scriptable Object Variables with UniRx\nThis is an implementation of variables in Unity using scriptable objects as explained in [this](https://www.youtube.com/watch?v=raQ3iHhE_Kk\u0026t=3289s) talk. We have integration with [UniRx](https://github.com/neuecc/UniRx) but there is an option to use this library without UniRx and use C# Actions instead. By default you will get version without UniRx integration. See Integrations section for a guide how to enable UniRx integration.\n\n# Usage\n## Creating Variable\nSimply right click into one of you folders in your project, select: Create -\u003e Variable -\u003e Select Type (there are some primitive types already contained in this library)\n## Using Variable\nAnywhere in you script simply define reference to a variable like:\n```C#\npublic BoolReference myVariableName;\n```\nor the variable itself\n```C#\npublic BoolVariable myVariableName;\n```\nAnd use it anyway you with. Preferably you want to use references for reading the values and variables for writing into them.\n\n# Persistance\nThere is a simple, generic, build in solution for persisting variables. What you need to do is\n   - Create a persistor (Create -\u003e Variables -\u003e Persistance -\u003e Persistor)\n   - Create serializer (Create -\u003e Variables -\u003e Persistance -\u003e Serializer) - You can choose from serializers that persist into player prefs or persistentDataPath\n   - Assign the serializer into the persistor, give it a filename\n   - Assign variables you want to persist into the persistor\n   - Use Save/Load to save and load the data\n   - (optional) - Put SaveDataWatcher on a game object, assign it a persistor(s), it will save / load data automatically and periodically\n\n# Creating new custom variables\nTo simplify the process of creation of new variables and editor scripts for them we have implemented tool that help you with that\n   - Use Tools -\u003e Reactive Variables -\u003e Create New (it uses current assembly, if you want to create variable for another assembly like Unitys Game Object or you are using new Assembly Definition Files, use All Assembly option)\n   - Pick folders where to store generated files\n        - Please note that the editor scripts needs to be stored in Editor folder or assembly\n   - Start typing the class name\n   - Select class you want to create variables for and click confirm\n        - In case of any errors\n        \n# Integrations\n  - This project is integrated with UniRx - https://github.com/neuecc/UniRx\n     - To enable this integration, use Tools -\u003e Reactive Variables -\u003e Enable UniRx Integration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrvcom%2Frxscriptablevariables-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrvcom%2Frxscriptablevariables-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrvcom%2Frxscriptablevariables-unity/lists"}