{"id":16122708,"url":"https://github.com/varneon/vudon-arrayextensions","last_synced_at":"2025-09-02T08:42:48.408Z","repository":{"id":55612773,"uuid":"523153428","full_name":"Varneon/VUdon-ArrayExtensions","owner":"Varneon","description":"Collection of array extension methods compatible with UdonSharp 1.x which adds partial feature set from List\u003cT\u003e","archived":false,"fork":false,"pushed_at":"2025-08-05T03:26:04.000Z","size":53,"stargazers_count":38,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-05T04:24:10.524Z","etag":null,"topics":["udonsharp","vrchat","vrchat-sdk3","vrchat-udon","vrcsdk3-worlds"],"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/Varneon.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"patreon":"Varneon"}},"created_at":"2022-08-10T00:52:47.000Z","updated_at":"2025-08-05T03:26:07.000Z","dependencies_parsed_at":"2023-02-04T23:16:40.737Z","dependency_job_id":"8dccc326-c803-49b5-939e-e050005510e9","html_url":"https://github.com/Varneon/VUdon-ArrayExtensions","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Varneon/VUdon-ArrayExtensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Varneon%2FVUdon-ArrayExtensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Varneon%2FVUdon-ArrayExtensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Varneon%2FVUdon-ArrayExtensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Varneon%2FVUdon-ArrayExtensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Varneon","download_url":"https://codeload.github.com/Varneon/VUdon-ArrayExtensions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Varneon%2FVUdon-ArrayExtensions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273257711,"owners_count":25073531,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["udonsharp","vrchat","vrchat-sdk3","vrchat-udon","vrcsdk3-worlds"],"created_at":"2024-10-09T21:13:28.815Z","updated_at":"2025-09-02T08:42:48.336Z","avatar_url":"https://github.com/Varneon.png","language":"C#","funding_links":["https://patreon.com/Varneon"],"categories":[],"sub_categories":[],"readme":"\u003cdiv\u003e\n\n# [VUdon](https://github.com/Varneon/VUdon) - Array Extensions ![](https://img.shields.io/badge/UdonSharp-Library-bb37fa) [![GitHub Repo stars](https://img.shields.io/github/stars/Varneon/VUdon-ArrayExtensions?style=flat\u0026label=Stars)](https://github.com/Varneon/VUdon-ArrayExtensions/stargazers) [![GitHub all releases](https://img.shields.io/github/downloads/Varneon/VUdon-ArrayExtensions/total?color=blue\u0026label=Downloads\u0026style=flat)](https://github.com/Varneon/VUdon-ArrayExtensions/releases) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/Varneon/VUdon-ArrayExtensions?color=blue\u0026label=Release\u0026sort=semver\u0026style=flat)](https://github.com/Varneon/VUdon-ArrayExtensions/releases/latest)\n\n\u003c/div\u003e\n\nCollection of array extension methods compatible with UdonSharp 1.x which adds partial feature set from List\n\n\u003e[!IMPORTANT]\n\u003eArray Extensions' `Add`, `AddRange`, `AddUnique`, `Insert`, `InsertRange`, `Remove`, `RemoveAt` and `RemoveRange` methods are intended for use cases that meet the following criteria:\n\u003e- [Array must be used instead of a DataList](https://creators.vrchat.com/worlds/udon/data-containers/data-lists/#when-should-i-use-an-array-instead-of-a-datalist) *(Commonly due to frequent iteration per frame)*\n\u003e- Methods listed above are invoked infrequently *(They have a high performance cost in exchange for the ability to manipulate arrays)*\n\n| **Method** | **Parameters** | **Returns** | **Description** |\n| - | - | - | - |\n| `Add` | `T` | `T[]` | *Adds an item to an array* |\n| `AddRange` | `T[]` | `T[]` | *Adds the elements of the specified collection to the end of the array* |\n| `AddUnique` | `T` | `T[]` | *Adds an item to an array and ensures duplicates are not added* |\n| `Contains` | `T` | `bool` | *Determines whether an element is in the array* |\n| `FirstOrDefault` | | `T` | *Returns the first element, or default value if the array is empty* |\n| `GetElementTypeUdon` | | `Type` | *Gets the element type of the array type* |\n| `GetRange` | `Int, Int` | `T[]` | *Creates a shallow copy of a range of elements in the source* |\n| `IndexOf` | `T` (`Int`, `Int`) | `Int` | *Returns the zero-based index of the first occurrence of a value in the T[]* |\n| `Insert` | `Int, T` | `T[]` | *Inserts item to array at index* |\n| `InsertRange` | `Int, T[]` | `T[]` | *Inserts the elements of a collection into the \u003cT\u003e[] at the specified index* |\n| `LastIndexOf` | `T` (`Int`, `Int`) | `Int` | *Returns the zero-based index of the last occurrence of a value in the T[]* |\n| `LastOrDefault` | | `T` | *Returns the last element, or default value if the array is empty* |\n| `Remove` | `T` | `T[]` | *Removes item from array* |\n| `RemoveAt` | `Int` | `T[]` | *Removes item at index from array* |\n| `RemoveRange` | `Int, Int` | `T[]` | *Removes a range of elements from the T[]* |\n| `Resize` | `Int` | `T[]` | *Resizes array* |\n| `Reverse` | | `T[]` | *Reverses Array* |\n\n\u003e [!CAUTION]\n\u003e For performance reasons this extension method library doesn't implement null checks! Please ensure the arrays you're accessing with the methods from this library are initialized.\n\n## Usage Demonstration\n```csharp\nusing UdonSharp;\nusing UnityEngine;\nusing Varneon.VUdon.ArrayExtensions;\n\npublic class UdonArrayExtensionDemo : UdonSharpBehaviour\n{\n    [SerializeField]\n    private string[] strings;\n\n    [SerializeField]\n    private string[] range;\n\n    [SerializeField]\n    private string text;\n\n    [SerializeField]\n    private int index;\n\n    [SerializeField]\n    private int count;\n\n    public void UsageDemo()\n    {\n        // Add item to array\n        strings = strings.Add(text);\n\n        // Add range of elements to array\n        strings = strings.AddRange(range);\n        \n        // Check if item is contained in array\n        Debug.Log(strings.Contains(text));\n\n        // Get range of elements in array\n        Debug.Log(string.Join(\"\\n\", strings.GetRange(index, count)));\n\n        // Get the first index of element in array\n        Debug.Log(strings.IndexOf(text));\n\n        // Get the first index of element in array, starting at index\n        Debug.Log(strings.IndexOf(text, index));\n\n        // Get the first index of element in array in a range starting at index at the size of count\n        Debug.Log(strings.IndexOf(text, index, count));\n\n        // Insert item to array\n        strings = strings.Insert(index, text);\n\n        // Insert array of items to array\n        strings = strings.InsertRange(index, range);\n\n        // Get the last index of element in array\n        Debug.Log(strings.LastIndexOf(text));\n\n        // Get the last index of element in array, starting at index\n        Debug.Log(strings.LastIndexOf(text, index));\n\n        // Get the last index of element in array in a range starting at index at the size of count\n        Debug.Log(strings.LastIndexOf(text, index, count));\n\n        // Remove item from array\n        strings = strings.Remove(text);\n\n        // Remove item at index from array\n        strings = strings.RemoveAt(index);\n\n        // Remove range of elements from array\n        strings = strings.RemoveRange(index, count);\n\n        // Reverse array\n        strings = strings.Reverse();\n\n        // Get the first element in array\n        Debug.Log(strings.FirstOrDefault());\n\n        // Get the last element in array\n        Debug.Log(strings.LastOrDefault());\n\n        // Get the element type of a type\n        Debug.Log(strings.GetType().GetElementTypeUdon());\n\n        // Add unique item to array (if item exists in array, it won't be added)\n        strings = strings.AddUnique(text);\n\n        // Resize array\n        strings = strings.Resize(index);\n    }\n}\n\n```\n\n# Installation\n\n\u003cdetails\u003e\u003csummary\u003e\n\n### Import with [VRChat Creator Companion](https://vcc.docs.vrchat.com/vpm/packages#user-packages)\u003c/summary\u003e\n\n\u003e Coming Soon™\n\n\u003c/details\u003e\u003cdetails\u003e\u003csummary\u003e\n\n### Import with [Unity Package Manager (git)](https://docs.unity3d.com/2022.3/Documentation/Manual/upm-ui-giturl.html)\u003c/summary\u003e\n\n\u003e 1. In the Unity toolbar, select `Window` \u003e `Package Manager` \u003e `[+]` \u003e `Add package from git URL...` \n\u003e 2. Paste the following link: `https://github.com/Varneon/VUdon-ArrayExtensions.git?path=/Packages/com.varneon.vudon.array-extensions`\n\n\u003c/details\u003e\u003cdetails\u003e\u003csummary\u003e\n\n### Import from [Unitypackage](https://docs.unity3d.com/2022.3/Documentation/Manual/AssetPackagesImport.html)\u003c/summary\u003e\n\n\u003e 1. Download latest `com.varneon.vudon.array-extensions.unitypackage` from [here](https://github.com/Varneon/VUdon-ArrayExtensions/releases/latest)\n\u003e 2. Import the downloaded .unitypackage into your Unity project\n\n\u003c/details\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n## Developed by Varneon with :hearts:\n\n[![Twitter Follow](https://img.shields.io/static/v1?style=for-the-badge\u0026label=@Varneon\u0026message=7.9K\u0026color=1b9df0\u0026logo=twitter)](https://twitter.com/Varneon)\n[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCKTxeXy7gyaxr-YA9qGWOYg?color=%23FF0000\u0026label=Varneon\u0026logo=YouTube\u0026style=for-the-badge)](https://www.youtube.com/Varneon)\n[![GitHub followers](https://img.shields.io/github/followers/Varneon?color=%23303030\u0026label=Varneon\u0026logo=GitHub\u0026style=for-the-badge)](https://github.com/Varneon)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarneon%2Fvudon-arrayextensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvarneon%2Fvudon-arrayextensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarneon%2Fvudon-arrayextensions/lists"}