{"id":18459381,"url":"https://github.com/juniordiscart/impossibleodds-toolkit","last_synced_at":"2025-04-08T06:31:45.483Z","repository":{"id":47457047,"uuid":"203662281","full_name":"juniordiscart/ImpossibleOdds-Toolkit","owner":"juniordiscart","description":"Unity C# toolkit to kickstart your project's codebase.","archived":false,"fork":false,"pushed_at":"2024-08-16T12:44:12.000Z","size":16099,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T07:12:15.851Z","etag":null,"topics":["csharp","dependency-injection","game-development","http","json","json-parser","photon","photon-pun","serialization","serializer","toolkit","tools","unity","unity3d","webrpc","xml","xml-parser","xml-parsing","xml-serialization"],"latest_commit_sha":null,"homepage":"https://www.impossible-odds.net/csharp-toolkit/","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/juniordiscart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-08-21T20:48:48.000Z","updated_at":"2025-01-20T14:15:27.000Z","dependencies_parsed_at":"2023-12-05T16:30:52.157Z","dependency_job_id":"7935860a-efaf-4721-bf53-8df3c0a5ca7d","html_url":"https://github.com/juniordiscart/ImpossibleOdds-Toolkit","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juniordiscart%2FImpossibleOdds-Toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juniordiscart%2FImpossibleOdds-Toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juniordiscart%2FImpossibleOdds-Toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juniordiscart%2FImpossibleOdds-Toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juniordiscart","download_url":"https://codeload.github.com/juniordiscart/ImpossibleOdds-Toolkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247791988,"owners_count":20996876,"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":["csharp","dependency-injection","game-development","http","json","json-parser","photon","photon-pun","serialization","serializer","toolkit","tools","unity","unity3d","webrpc","xml","xml-parser","xml-parsing","xml-serialization"],"created_at":"2024-11-06T08:22:56.856Z","updated_at":"2025-04-08T06:31:44.558Z","avatar_url":"https://github.com/juniordiscart.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![Impossible Odds Logo][Logo] Impossible Odds - C# Toolkit\n\nThe Impossible Odds C# Toolkit for Unity is a set of carefully crafted tools to help you kickstart your project's codebase. It's designed with ease-of-use in mind, provide tools to keep your codebase clean and efficient. It combines several utilities and frameworks to help you think more about your game and gameplay design rather than code design.\n\nYou can expect to find the following features in this toolkit:\n\n* [Core utilities](#core-utilities): extension and utility functions to speed-up programming work and reduce boiler-plate code.\n* [Dependency injection](#dependency-injection): keep your code organized and clean by removing tightly coupled design patterns.\n* [Runnables](#runnables): avoid the MonoBehaviour and GameObject tax if your classes only need the `Update` functionality.\n* [State machines](#state-machines): use the state machine design pattern with a quick, easy and robust setup.\n* [JSON](#json): serialize your data to and from the JSON data format, with support for saving type information.\n* [XML](#xml): serialize your data to and from the XML data format using an easier alternative compared to C#'s built-in XML tools.\n* [HTTP](#http): easily transform your objects for sending data to your server using Unity’s web requests.\n* [Photon - WebRPC Extensions](#photon---webrpc-extensions): a convenience framework when sending requests over Photon's multiplayer network to your custom web server.\n\n## Core Utilities\n\nIn the overarching `ImpossibleOdds` namespace, you'll find many smaller, but useful functions to speed up your development. Some highlights of what you will find in here:\n\n* Custom logging tool for which logging levels can be enabled/disabled.\n* Clear out delegates of specific objects in a single line of code.\n* Invoke actions with a null-check in a single line of code.\n* Useful list extensions to write more concise code.\n* Decorate enum values with a display name or translation key.\n* Automatic script execution ordering based on execution dependencies between scripts.\n* Object and string extensions to throw or log an error when null.\n\nAll details and more about these little additions can be found [here][CoreUtilities].\n\n## Dependency Injection\n\nThe `ImpossibleOdds.DependencyInjection` namespace contains a simple framework for adding the dependency injection methodology to your project. There are similar frameworks out there, packed with a ton more features and validation mechanisms. However, the goal of this particular implementation is to provide a more simple and streamlined setup that takes the essence of what dependency injection is all about.\n\nInterested in integrating this in your project? Read more about how it works [here][DependencyInjection]!\n\n## Runnables\n\nThe `ImpossibleOdds.Runnables` namespace provides the tools to ditch the GameObject and MonoBehaviour methodology for classes and data that require the `Update` functionality, but don't need anything more than that to function properly.\n\nRead about how to get your scripts running [here][Runnables].\n\n## State Machines\n\nA state machine is a commonly used pattern in game development and comes in a wide variety of shapes, sizes and complexity. The `ImpossibleOdds.StateMachines` namespace contains a generic framework to get you started on setting up custom state machines.\n\nTo learn all about it's ins and outs, please read its documentation page [here][StateMachines].\n\n## JSON\n\nThe `ImpossibleOdds.Json` namespace allows you to (de)serialize your data from/to the JSON data format. Unity already has a built-in `JsonUtility` class that allows you to serialize your objects. However, it lacks control in terms of which members and under what name you want to serialize them. On the other side, there's the widely popular Json.NET library which is packed with tons of features.\n\nThis implementation aims to be somewhere in between. The main advantages over Unity's `JsonUtility` class is that you can decide which members should be serialized (from public all the way to private) and under what name they are saved. Additionally, it also provides support for serializing type information, allowing you to keep the inheritance chain intact when deserializing your data.\n\nCurious to know how it works? Get all the details [here][Json].\n\nFor more details about the data (de)serialization process itself, check the [Serialization][Serialization] section.\n\n## XML\n\nThe `ImpossibleOdds.Xml` namespace provides tools to process your data to/from the XML data format. The C# language has a bunch of XML tools already available for you to use, but they have a few shortcomings such as only capable of picking up public members, or force you to use tedious classes such as the `DataContractSerializer` class.\n\nThe XML implementation in this toolkit aims to give a great amount of control which members of your classes and how they should get processed.\n\nGet to know the XML tools and what they have to offer [here][Xml].\n\nFor more details about the data (de)serialization process, check the [Serialization][Serialization] section.\n\n## HTTP\n\nThe `ImpossibleOdds.Http` namespace contains allows you to process your objects directly to requests and responses suitable to send over to your game sever as well as a helpful messenger system that takes care of performing callback operations on interested objects when a response is received.\n\nTo start communicating with your server, check the documentations page [here][Http].\n\nFor more details about the data (de)serialization process, check the [Serialization][Serialization] section.\n\n## Photon - WebRPC Extensions\n\nIn the `ImpossibleOdds.Photon.WebRpc` namespace, you'll find an extension framework on Photon's multiplayer package, specifically for sending requests and receiving responses from your web server over the WebRPC feature.\n\nFor more information about this tool and how to get started, read on [here][PhotonWebRPC].\n\nFor more details about the data (de)serialization process, check the [Serialization][Serialization] section.\n\n**Note**: this tool is only available when a valid Photon package is installed in your project. It is disabled otherwise.\n\n## Editor Settings\n\nThis toolkit has a custom entry in your project settings panel. It currently allows you to adjust the following settings:\n\n* Enable editor extensions: whether or not some context sensitive menu's are enabled or not.\n* Editor logging level: enable/disable certain logging messages from being executed while playing in editor.\n* Player logging level: enable/disable certain logging messages from being executed in the player build.\n* Json serialization settings: define the default behaviour of the JSON serializer for certain Unity data types such as `Color`, `Vector3`, `Quaternion`, etc.\n* Xml serialization settings: define the default behavior of the XML serializer for certain Unity data types such as `Color`, `Vector3`, `Quaternion`, etc.\n\n![Editor Settings][EditorSettings]\n\nMost settings are saved using preprocessor directives in the ProjectSettings.asset file.\n\n## Advanced\n\nThe sub-sections found below are most likely not sections you'll come in direct contact with unless you wish to build or expand upon the features provided in this toolkit.\n\n### Serialization\n\nThe `ImpossibleOdds.Serialization` namespace contains a flexible data transformation framework, ideal for serialization purposes. It allows to define a blueprint for rules on how data should be processed and transformed from one format to the other. It is the backbone for the [JSON][Json] and [HTTP][Http] features found in this toolkit.\n\nAll details can be found [here][Serialization].\n\n### Weblink\n\nThe `ImpossibleOdds.Weblink` tool provides a request-response mechanism along with automated processing of the data coming through it as well as providing a plethora of ways on getting notified when a message has completed. This removes the worry to manually keep track of request objects and waiting for their responses, as well as processing their data to the right format. The [HTTP][Http] and [Photon WebRPC][PhotonWebRPC] extension tools are practical implementations of the Weblink framework.\n\nFor more details, check its documentations page [here][Weblink].\n\n## Contributing\n\nContributions are more than welcome! If you have ideas on how to improve the concepts or structure of this toolkit, have additional ideas for features to add, come across a bug, or want to let me know you're using this toolkit in your project, feel free to [get in touch][Contact]!\n\n## Unity Version\n\nDeveloped and tested on Unity 2019.4 LTS.\n\n## License\n\nThis package is provided under the [MIT][License] license.\n\n## Changelog\n\nView the [update history][Changelog] of this package.\n\n[License]: ./LICENSE.md\n[Changelog]: ./CHANGELOG.md\n[EditorSettings]: ./Docs/Images/EditorSettings.png\n[CoreUtilities]: ./Docs/CoreUtilities.md\n[DependencyInjection]: ./Docs/DependencyInjection.md\n[Runnables]: ./Docs/Runnables.md\n[Json]: ./Docs/Json.md\n[Xml]: ./Docs/Xml.md\n[Http]: ./Docs/Http.md\n[PhotonWebRPC]: ./Docs/PhotonWebRPC.md\n[StateMachines]: ./Docs/StateMachines.md\n[Weblink]: ./Docs/Weblink.md\n[Serialization]: ./Docs/Serialization.md\n[Contact]: https://www.impossible-odds.net/support-request/\n[Logo]: ./Docs/Images/ImpossibleOddsLogo.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniordiscart%2Fimpossibleodds-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuniordiscart%2Fimpossibleodds-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniordiscart%2Fimpossibleodds-toolkit/lists"}