{"id":13340845,"url":"https://github.com/Pokeyi/VRC-Object-Spawner","last_synced_at":"2025-03-11T19:30:43.523Z","repository":{"id":132431213,"uuid":"435101777","full_name":"Pokeyi/VRC-Object-Spawner","owner":"Pokeyi","description":"Network-synced object spawner \u0026 controller for VRChat.","archived":false,"fork":false,"pushed_at":"2023-07-27T23:40:05.000Z","size":56,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-24T06:29:52.566Z","etag":null,"topics":["unity","vr","vrchat","vrchat-sdk3","vrchat-tool","vrchat-udon","vrchat-worlds"],"latest_commit_sha":null,"homepage":"https://pokeyi.dev","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/Pokeyi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"pokeyi"}},"created_at":"2021-12-05T07:27:52.000Z","updated_at":"2024-10-03T18:43:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"797fe63d-8ff6-4478-861f-59ea8026d623","html_url":"https://github.com/Pokeyi/VRC-Object-Spawner","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/Pokeyi%2FVRC-Object-Spawner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pokeyi%2FVRC-Object-Spawner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pokeyi%2FVRC-Object-Spawner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pokeyi%2FVRC-Object-Spawner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pokeyi","download_url":"https://codeload.github.com/Pokeyi/VRC-Object-Spawner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243098644,"owners_count":20236065,"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","vr","vrchat","vrchat-sdk3","vrchat-tool","vrchat-udon","vrchat-worlds"],"created_at":"2024-07-29T19:24:02.711Z","updated_at":"2025-03-11T19:30:43.516Z","avatar_url":"https://github.com/Pokeyi.png","language":"C#","funding_links":["https://patreon.com/pokeyi","https://www.paypal.com/donate?hosted_button_id=XFBLJ5GNSLGRC"],"categories":[],"sub_categories":[],"readme":"# [💾](https://github.com/Pokeyi/VRC-Object-Spawner/blob/main/P_ObjectSpawner.cs) VRC-Object-Spawner [![Downloads](https://img.shields.io/github/downloads/Pokeyi/VRC-Object-Spawner/total?label=Downloads\u0026logo=github)](https://github.com/Pokeyi/VRC-Object-Spawner/releases)\nNetwork-synced object spawner \u0026 controller for VRChat.\n\n![Object Spawner](P_ObjectSpawner.png)\n\n### VRChat Creator Companion App (VCC)\n***This project can now be imported through VCC with the [Pokeyi's Udon Tools](https://github.com/Pokeyi/vpm-packages#vpm-packages) VPM package.***\n\n## Overview\n🚧 This project is functional but in early stages with additional features planned. 🚧\n\nVRC Object Spawner is a single configurable UdonSharp behaviour that can be used to spawn and manage movement of multiple objects simultaneously synchronized to all players.\n\nIt is intended to be efficient and relatively simple to use without the need for any additional editor scripts or dependencies outside of UdonSharp. All configuration can be done within the Unity Inspector window without the need for any programming, Udon, or SDK knowledge. That said, the source code is cleanly-organized and commented in the hopes of also being a good learning tool.\n\n### Requirements\nErrors regarding functions not being exposed likely mean you need an updated version of the SDK or UdonSharp.\n- [Unity](https://docs.vrchat.com/docs/current-unity-version) (Tested: v2019.4.31f1)\n- [VRChat Worlds SDK3](https://vrchat.com/home/download) (Tested: v2021.11.8)\n- [UdonSharp](https://github.com/MerlinVR/UdonSharp) (Tested: v0.20.3)\n\n### Optional\nComponents with functionality supporting this behaviour, should you like to use them.\n- [VRC Omni-Action](https://github.com/Pokeyi/VRC-Omni-Action) (Multi-Purpose Function Handler)\n\n### Recommended\nOther useful VRChat world-creation tools that I will always recommend.\n- [World Creator Assistant](https://github.com/Varneon/WorldCreatorAssistant) (SDK \u0026 Package Management)\n- [CyanEmu](https://github.com/CyanLaser/CyanEmu) (Unity-Window Testing)\n- [VRWorld Toolkit](https://github.com/oneVR/VRWorldToolkit) (World Debugger)\n\n### Setup\nMake sure you have already imported the VRChat Worlds SDK and UdonSharp into your project.\n- Download the latest [Unity Package](https://github.com/Pokeyi/VRC-Object-Spawner/releases) and import it into your project.\n- A pre-configured example prefab is included that you can drop into your scene if you like.\n- Create and select an empty game object. I recommend adding the game objects you want to spawn as children of this object. They will spawn from their original transform positions.\n- Add the P_ObjectSpawner behaviour via the Unity Inspector window or 'Component \u003e Pokeyi.VRChat \u003e P.VRC Object Spawner' toolbar menu.\n- Click the 'Convert to UdonBehaviour' button if prompted.\n- If a VRC-Object-Pool component is not already on your game object, one will be added automatically. You will drag your spawnable objects here. More details on this below.\n- Click the small triangle next to Pool to expand the array.\n- If the Size field is left at 0, you can lock the Inspector tab and drag the spawnable objects into the Pool label to add them all to the array at once. You can alternatively enter a Size value and drag them in one at a time.\n- Configure the rest of the behaviour's properties in the Inspector window as you see fit. Each of these is explained in detail further below.\n\n## Features\nThe main features of the Object Spawner.\n- VRC-Object-Pool - A necessary component included with the VRChat SDK that handles a portion of the spawner functionality. (See: [VRChat Docs](https://docs.vrchat.com/docs/network-components#vrc-object-pool))\n- Velocity Properties - Properties pertaining to the movement of the objects after they are spawned.\n- Return Options - Options for how each spawned object will be returned to the pool.\n- Spawner Events - Events called to Spawn objects from the pool or Reset them.\n\nAll of the following properties have hover-tooltips in the Unity Inspector window.\n\n### VRC-Object-Pool\nThe object pool component storing the array of game objects you've selected to be handled by this behaviour. Must be on the same game object as this behaviour.\n- Copies of prefabs can not be traditionally instantiated in VRChat, you must pool objects already added to the scene.\n- If there are too-few objects available to spawn, the next will be skipped until another is returned. There is no limit imposed on the number of game objects you can add.\n- See [Setup](#setup) above for tips on placing game objects into the object pool via the Unity Inspector window.\n\n### Velocity Properties\nProperties governing the movement of the objects after they are spawned.\n- Spawn Velocity - The speed and direction in which each spawned object will move once it is spawned. This is relative to the spawner itself.\n- Face Velocity - Whether each spawned object turns to face its velocity or keeps its original rotation.\n\n### Return Options\nOptions for how each spawned object will be returned to the pool.\n- Shuffle Pool - When all spawnable objects are returned, the object pool order will be shuffled.\n- Return Distance - Maximum distance each spawnable object can travel from the source before it is returned.\n- Return Time - Maximum time in seconds each spawnable object can be active before it is returned.\n\n### Spawner Events\nEvents called to Spawn objects from the pool or Reset them. (See: Notes [#1](#notes))\n- Call the public \"\\_SpawnObject\" method to spawn the next object from the pool.\n- Call the public \"\\_ResetObjects\" method to return all active objects to the pool.\n- This can be done without any programming by selecting 'SendCustomEvent(String)' from the dropdown for [UI Events](https://docs.vrchat.com/docs/ui-events).\n\n### Use Case Examples\nBasic examples for which you could use a moving object spawner.\n- Projectiles\n- Moving Obstacles\n- Environmental Effects\n\n### Notes\n1. Per the VRChat API, public method/event names starting with an \"\\_Underscore\" are protected from remote network calls, necessitating use of a local-only event. Doing this protects them from being called by malicious clients and potentially breaking functionality in your world.\n\n## Credit \u0026 Support\nPlease credit me as Pokeyi if you use my work. I would also love to see your creations that make use of it if you're inclined to share. This and [related projects](https://github.com/Pokeyi/pokeyi.github.io#my-projects) have involved many months of solid work and self-education as I strive for an opportunity to change careers and make a better life for myself. If you find value in my work, please consider supporting me, it would truly help a lot.\n\n[![Patreon](https://img.shields.io/badge/Patreon-Support-red?logo=patreon)](https://patreon.com/pokeyi)\n\n[![PayPal](https://img.shields.io/badge/PayPal-Donate-blue?logo=paypal)](https://www.paypal.com/donate?hosted_button_id=XFBLJ5GNSLGRC)\n\n## License\nThis work is licensed under the MIT License.\n\nCopyright © 2021 Pokeyi - https://pokeyi.dev - [pokeyi@pm.me](mailto:pokeyi@pm.me)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPokeyi%2FVRC-Object-Spawner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPokeyi%2FVRC-Object-Spawner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPokeyi%2FVRC-Object-Spawner/lists"}