Skip to content

[Feature]: Create new values when accessing datatype constants #1177

Description

@arlocomotive

Area

Scripting API or runtimes

Problem or use case

most datatype constants (Vector3.Up, SPECIFICALLY not Quaternion.Identity) always return the same value when accessing them, which allows scripts to modify the constants across the entire shared script state:

--- script 1 (sorted above, run first) ---
Vector3.Up.X = 5
--- script 2 (sorted below, run second) ---
print(Vector3.Up.X) -- <Vector3:(5, 1, 0)>

Proposed solution

datatype constants should return new values when accessing them, so scripts can safely modify them

Alternatives considered

No response

Who benefits?

Creators

Are you interested in implementing this?

Yes, I would like to contribute this feature.

Additional details

this Could break compatibility but I feel like this is a really weird feature to theoretically rely on so ummmm

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:featureNew feature or capability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions