{"id":13731105,"url":"https://github.com/JimTheKiwifruit/SimpleSingleton","last_synced_at":"2025-05-08T03:32:59.060Z","repository":{"id":70268102,"uuid":"201713111","full_name":"JimTheKiwifruit/SimpleSingleton","owner":"JimTheKiwifruit","description":"A simple singleton implementation for Unity in UPM form for easy addition to projects.","archived":false,"fork":false,"pushed_at":"2020-01-02T10:29:44.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-04T02:09:57.932Z","etag":null,"topics":["libraries","singleton","singleton-pattern","unity","unity-scripts","unity3d"],"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/JimTheKiwifruit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-08-11T03:41:23.000Z","updated_at":"2020-06-11T14:34:16.000Z","dependencies_parsed_at":"2023-04-07T04:16:38.117Z","dependency_job_id":null,"html_url":"https://github.com/JimTheKiwifruit/SimpleSingleton","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/JimTheKiwifruit%2FSimpleSingleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimTheKiwifruit%2FSimpleSingleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimTheKiwifruit%2FSimpleSingleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimTheKiwifruit%2FSimpleSingleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JimTheKiwifruit","download_url":"https://codeload.github.com/JimTheKiwifruit/SimpleSingleton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224695909,"owners_count":17354510,"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":["libraries","singleton","singleton-pattern","unity","unity-scripts","unity3d"],"created_at":"2024-08-03T02:01:23.940Z","updated_at":"2024-11-14T21:32:10.131Z","avatar_url":"https://github.com/JimTheKiwifruit.png","language":"C#","readme":"# Simple Singleton\n\nA simple singleton implementation for Unity in UPM form for easy addition to projects.\n\n## Installation\n\nIn your Unity project open `Packages/manifest.json` and add `\"com.jimthekiwifruit.simplesingleton\": \"https://github.com/JimTheKiwifruit/SimpleSingleton\",` to the top of your dependencies:\n\n```json\n{\n  \"dependencies\": {\n    \"com.jimthekiwifruit.simplesingleton\": \"https://github.com/JimTheKiwifruit/SimpleSingleton.git\",\n    \"com.unity.collab-proxy\": \"1.2.16\",\n    \"com.unity.ext.nunit\": \"1.0.0\",\n    \"com.unity.ide.rider\": \"1.0.8\",\n    \"com.unity.ide.vscode\": \"1.0.7\",\n    ...\n  }\n}\n```\n\nYou can checkout the full docs on UPM dependancies at [https://docs.unity3d.com/Manual/upm-git.html](https://docs.unity3d.com/Manual/upm-git.html)\n\n## Usage\n\nInstead of extending from `MonoBehaviour`, extend from `Singelton\u003cClassName\u003e` like this:\n\n```csharp\nusing JimTheKiwifruit.Singleton;\n\npublic class YourClass : Singleton\u003cYourClass\u003e {\n\n  void DoSomething() {\n    print(\"Something\");\n  }\n\n}\n```\n\nNow you can access your singleton from anywhere:\n\n```csharp\nvoid DoStuffWithSingletonClass() {\n  YourClass.Instance.DoSomething();\n}\n```\n","funding_links":[],"categories":["C#"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJimTheKiwifruit%2FSimpleSingleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJimTheKiwifruit%2FSimpleSingleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJimTheKiwifruit%2FSimpleSingleton/lists"}