{"id":13663394,"url":"https://github.com/bengreenier/unity-fucking-singletons","last_synced_at":"2025-04-10T21:22:06.829Z","repository":{"id":57242660,"uuid":"114056666","full_name":"bengreenier/unity-fucking-singletons","owner":"bengreenier","description":"A framework of patterns for avoiding antipatterns in Unity","archived":false,"fork":false,"pushed_at":"2017-12-13T02:24:26.000Z","size":168,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T18:52:25.800Z","etag":null,"topics":["unity-scripts","unity3d"],"latest_commit_sha":null,"homepage":"","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/bengreenier.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}},"created_at":"2017-12-13T01:09:42.000Z","updated_at":"2023-08-29T10:45:19.000Z","dependencies_parsed_at":"2022-09-15T01:33:51.829Z","dependency_job_id":null,"html_url":"https://github.com/bengreenier/unity-fucking-singletons","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengreenier%2Funity-fucking-singletons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengreenier%2Funity-fucking-singletons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengreenier%2Funity-fucking-singletons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengreenier%2Funity-fucking-singletons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bengreenier","download_url":"https://codeload.github.com/bengreenier/unity-fucking-singletons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248147120,"owners_count":21055479,"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":["unity-scripts","unity3d"],"created_at":"2024-08-02T05:02:26.433Z","updated_at":"2025-04-10T21:22:06.780Z","avatar_url":"https://github.com/bengreenier.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# Fucking Singletons\r\n\r\nA framework of patterns for avoiding antipatterns in Unity\r\n\r\n![readme image](./README.png)\r\n\r\nInspired heavily (entirely) by [Ryan's talk](https://www.youtube.com/watch?v=raQ3iHhE_Kk) at Unite 2017, this is a framework that provides some tools that make writing better game code easier.\r\n\r\n## Background\r\n\r\nThis framework depends heavily on ScriptableObjects to make things work. As such, you should have an understanding of what those are! The best way to get that understanding is likely from [this video](https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/scriptable-objects).\r\n\r\n\r\n## API\r\n\r\n\u003e Current version is `0.1.0`\r\n\r\nThese are the \"tools\" that the framework provides :tada:\r\n\r\n### SOObject\r\n\r\n\u003e Abstract class\r\n\r\nA `SOObject` represents some primitive type as a scriptable object. It's effectively a data wrapper.\r\n\r\n### SOBool\r\n\r\nA primitive wrapper, wrapping a boolean value. \r\n\r\n### SOFloat\r\n\r\nA primitive wrapper, wrapping a float value. \r\n\r\n### SOInt\r\n\r\nA primitive wrapper, wrapping an int value. \r\n\r\n### SOString\r\n\r\nA primitive wrapper, wrapping a string value.\r\n\r\n### SOReference\r\n\r\n\u003e Abstract class\r\n\r\nA `SOReference` provides an abstraction layer for your systems - enabling them to work on data represented as `SOObject`s, or as constant values.\r\n\r\n### SOBoolReference\r\n\r\nAbstraction representing either a `SOBool` or a boolean constant.\r\n\r\n### SOFloatReference\r\n\r\nAbstraction representing either a `SOFloat` or a float constant.\r\n\r\n### SOIntReference\r\n\r\nAbstraction representing either a `SOInt` or an int constant.\r\n\r\n### SOStringReference\r\n\r\nAbstraction representing either a `SOString` or a string constant.\r\n\r\n### SOEvent\u003cT0,T1,T2,T3\u003e\r\n\r\nA `SOEvent` represents an event that can be raised, and a collection of listeners that will be notified in the event that it is, in fact, raised.\r\n\r\n#### Raise\r\n\r\nRaises the event (optionally with parameters)\r\n\r\n#### RegisterListener\r\n\r\nRegisters a listener\r\n\r\n#### UnregisterListener\r\n\r\nUnregisters a listener\r\n\r\n### SOEventListener\u003cT0,T1,T2,T3\u003e\r\n\r\nA `SOEventListener` represents the response to a `SOEvent` - namely the action(s) to take when it is raised\r\n\r\n### SOSet\r\n\r\nA `SOSet` represents a collection of items.\r\n\r\n#### Items\r\n\r\nReturns the child items\r\n\r\n#### GetChildCount\r\n\r\nReturns the count of the child items\r\n\r\n#### Add\r\n\r\nAdds a child item\r\n\r\n#### Remove\r\n\r\nRemoves a child item\r\n\r\n### GameObjectSOSet\r\n\r\nA set wrapper for storing `GameObject`s\r\n\r\n#### GameObjectSOSetElement\r\n\r\nA runtime helper for adding `GameObject`s to a `GameObjectSOSet` - this enables runtime population of a set\r\n\r\n### Metadata\r\n\r\nContains information about the framework (like version, editor tooling information, etc)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbengreenier%2Funity-fucking-singletons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbengreenier%2Funity-fucking-singletons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbengreenier%2Funity-fucking-singletons/lists"}