{"id":20905959,"url":"https://github.com/code-beans/unitypropertyinspector","last_synced_at":"2025-05-13T05:31:20.453Z","repository":{"id":86244130,"uuid":"128552534","full_name":"code-beans/UnityPropertyInspector","owner":"code-beans","description":"A Unity Extension to Expose Properties in the the Unity Inspector for Monobehaviours","archived":false,"fork":false,"pushed_at":"2018-04-07T18:36:59.000Z","size":6,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T18:24:49.367Z","etag":null,"topics":["asset","unity","unity3d","unityengine"],"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/code-beans.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-04-07T17:36:03.000Z","updated_at":"2021-06-30T22:41:56.000Z","dependencies_parsed_at":"2023-03-08T10:00:29.656Z","dependency_job_id":null,"html_url":"https://github.com/code-beans/UnityPropertyInspector","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/code-beans%2FUnityPropertyInspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-beans%2FUnityPropertyInspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-beans%2FUnityPropertyInspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-beans%2FUnityPropertyInspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-beans","download_url":"https://codeload.github.com/code-beans/UnityPropertyInspector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253882971,"owners_count":21978581,"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":["asset","unity","unity3d","unityengine"],"created_at":"2024-11-18T13:28:22.598Z","updated_at":"2025-05-13T05:31:20.447Z","avatar_url":"https://github.com/code-beans.png","language":"C#","readme":"# UnityPropertyInspector\n\nA Unity Extension to expose C# properties in the the Unity Inspector for MonoBehaviours\n\nsee [reference](http://wiki.unity3d.com/index.php/Expose_properties_in_inspector) to the original author\n\n## Build \u0026 Install\n\nYou can install this extension in various ways depending on your personal preference.\n\n### Source\n\nAdd the source files `\\UnityPropertyInspector` to your `Assets\\` folder\n\n### UnityPackage\n\nUse the appropriate \\*.unitypackage from the [release section](https://github.com/code-beans/UnityPropertyInspector/releases)\n\n### DLL\n\nCopy the \\*.dlls from the [release section](https://github.com/code-beans/UnityPropertyInspector/releases) into your `Assets\\` folder.\nPlease note: You may need to compile your own .DLLs in case the precompiled versions do not match your required Unity version.\n\n### Build\n\nYou may want to build your own .DLLs from source to declutter your code base.    \n\n*Visual Studio*\n\n* Check out the repository\n* Set the correct path for the `UnityEngine.dll` and `UnityEditor.dll` in the project references to your installed Unity version\n(usually installed under `C:\\Program Files\\Unity\\Editor\\Data\\Managed\\`)\n* Set the target framework in the solution properties to the appropriate Unity target (i.e. either Unity .NET 3.5 subset or Unity .NET 3.5 full)\n* Clean solution\n* Build\n\n## Documentation\n\nThe Unity Editor exposes public fields in the inspector window, but does not handle properties.\nSome developers circumvent this limitation by polling changes in the \"`Update()`-loop\". The result is poorly maintainable and unperformant code.\n\nDon't:\n\n```csharp\npublic class MyMonoBehaviour : MonoBehaviour {\n\n  public int health;\n\n  //called per frame\n  void Update() {\n    SetHealthbar(health);\n  }\n}\n```\n\nDo:\n\n```csharp\npublic class MyMonoBehaviour : ExposedMonoBehaviour {\n\n  [SerializeField,HideInInspector] private int _health; //auto properties are not serialized by unity! Use fields instead\n\n  [ExposeProperty]\n  public int Health {\n    get {\n      return _health;\n    }\n    set {\n      _health = value;\n      SetHealthbar(value); //called only once\n    }\n  }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-beans%2Funitypropertyinspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-beans%2Funitypropertyinspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-beans%2Funitypropertyinspector/lists"}