Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add deconstructors for vector types

Open
#100 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp

Research direction

Start by locating the vector type definitions in the C# library and reviewing how their x, y, and z components are exposed. Check all relevant vector dimensions and existing tests or usage examples; done means the supported vector types can be assigned with C# deconstruction syntax without the repeated component-access code shown in the issue.

Written by the indexing model from the issue text.

Description

It would be nice if the vector types had built-in deconstructors. So that we could write

var (x, y, z) = properlyNamedVectorVariable;

instead of verbose and error-prone

var x = properlyNamedVectorVariable.x;
var y = properlyNamedVectorVariable.y;
var z = properlyNamedVectorVariable.z;

or

var (x, y, z) = (properlyNamedVectorVariable.x, properlyNamedVectorVariable.y, properlyNamedVectorVariable.z);
Dominant language
C#
Stars
1.4k
Forks
159
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Unity-Technologies/Unity.Mathematics

All issues in Unity-Technologies/Unity.Mathematics

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.