{"id":15680658,"url":"https://github.com/stefanak-michal/unity-stuff","last_synced_at":"2025-05-07T11:16:39.388Z","repository":{"id":48664233,"uuid":"159663943","full_name":"stefanak-michal/Unity-Stuff","owner":"stefanak-michal","description":"Different unity scripts and functions created by me at one place","archived":false,"fork":false,"pushed_at":"2022-07-23T06:47:57.000Z","size":36,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T11:16:30.493Z","etag":null,"topics":["multicast","unity"],"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/stefanak-michal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"stefanak-michal","ko_fi":"michalstefanak"}},"created_at":"2018-11-29T12:37:15.000Z","updated_at":"2023-08-30T04:10:26.000Z","dependencies_parsed_at":"2022-09-17T11:02:03.305Z","dependency_job_id":null,"html_url":"https://github.com/stefanak-michal/Unity-Stuff","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/stefanak-michal%2FUnity-Stuff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanak-michal%2FUnity-Stuff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanak-michal%2FUnity-Stuff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanak-michal%2FUnity-Stuff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanak-michal","download_url":"https://codeload.github.com/stefanak-michal/Unity-Stuff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252865588,"owners_count":21816309,"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":["multicast","unity"],"created_at":"2024-10-03T16:43:49.121Z","updated_at":"2025-05-07T11:16:39.284Z","avatar_url":"https://github.com/stefanak-michal.png","language":"C#","funding_links":["https://github.com/sponsors/stefanak-michal","https://ko-fi.com/michalstefanak","https://ko-fi.com/Z8Z5ABMLW'"],"categories":[],"sub_categories":[],"readme":"# Unity-Stuff\nDifferent unity scripts and functions created by me at one place. Readme contains description of all scripts in this repository.\n\n\u003cbr\u003e\n\n***\n\n\u003cbr\u003e\n\n## Network/MulticastDiscovery.cs\nUDP Multicast discovery service. Class with similar function like Unity NetworkDiscovery component, but my works with multicast, not a broadcast. It's helpful if you have more network adapters.\n\n\u003cbr\u003e\n\n***\n\n\u003cbr\u003e\n\n## File/Share.cs\n## File/Editor/ShareInspector.cs\n\n### Usage\nYou need to create GameObject in scene and add FileShare.cs script as component. Then you can call it from other scripts.\n\n```c#\nFileShare.RegisterReceiveAction(\"someAction\", (file) =\u003e { Debug.Log(\"received file: \" + file); });\nFileShare.Send(\"someFile.xml\", \"someAction\");\n```\n\nYou can set target directory for received files. For example:\n```c#\nFileShare.SetTempDirectory(Application.dataPath);\n```\n\n### Explanation\nAt the start you need action (ex. lambda function) after receive file on client side. Identifier of this action is string. Also you have a option to remove (UnregisterReceiveAction) this action. Progress of sending a file is starting with Unity message sended to all clients, to be prepared to receive file on specified port. Client (sender of file) ask server for client addresses and send the file to all of them. Each client after receiving a file invokes action by specified identifier.\n\n### Warning\nUnity message are identified by \"short\" value. This script is using Unity highest (47) +1 and +2. If you are using those message numbers, you can change it directly in script region \"network message stuff\".\n\nWhile you are testing sharing files, use two computers. Windows not allowing open same port for multiple instances.\n\nTested on Unity 5.5 and 2017.2. Tested only on Windows.\n\n\u003cbr\u003e\n\n***\n\n\u003cbr\u003e\n\n## Editor/SkyboxEditor.cs\nHelp utility to setup 6 Sided skybox material. You can find it in top menu Window \u003e Skybox Editor.\n\n\u003cbr\u003e\n\n***\n\n\u003cbr\u003e\n\n## Development/Invoker.cs\n## Development/InvokerInspector.cs\nExtension for Unity3D editor to have a option to invoke any method from any component script on any GameObject\n\nOne video should say more then a lot of words. Tested on Unity 5.5 and 2017.2.\n\n[![Youtube](http://img.youtube.com/vi/JZ4mGmtQTvA/0.jpg)](http://www.youtube.com/watch?v=JZ4mGmtQTvA)\n\nAvailable method argument types:\n* Base types also available in array and List\n  * int\n  * float\n  * bool\n  * string\n  * long\n* Unity struct types\n  * Vector2\n  * Vector3\n  * Vector4\n  * Quaternion\n  * Rect\n  * Color\n  * Bounds\n  * AnimationCurve\n* all classes inherited from UnityEngine.Object like GameObject, Transform, etc.\n\n_How to render this arguments is defined in Invoker.cs, you have option to extend it with your own. Same render way is used for render method output value, if it's not void._\n\n\u003cbr\u003e\n\n***\n\n\u003cbr\u003e\n\n## MouseOverUI.cs\nVerify if mouse cursor or any finger touch is over any UI element. It's important that UI elements needs to have turned on \"Raycast Target\". Static approach, just ask for property \"Verify\".\n\n\u003cbr\u003e\n\n***\n\n\u003cbr\u003e\n\n## GyroControl.cs\nScript to move camera with gyro sensor (usually at mobile device). Device can have 3 different sensors to recognize rotation and not all are always installed. This script uses most used installed sensor (usually if device support auto display rotation it has this sensor).\n\n\u003cbr\u003e\n\n## Thanks and support\n\n\u003ca href='https://ko-fi.com/Z8Z5ABMLW' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanak-michal%2Funity-stuff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanak-michal%2Funity-stuff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanak-michal%2Funity-stuff/lists"}