-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Help wantedExtra attention is neededExtra attention is needed
Description
This is not a pretty solution but it would help avoiding the issue of value type getters returning temporary copies of the underlying types. The problem is that autogenerated getters typically retrieve a field named <prop>k_BackingField, (IsSpecialName returns true) which is compiler-specific. So not exactly portable.
The idea is to not limit the user to reference type substructures:
public class C3Vector // Runtime exception if value type.
{
public float X { get; set; }
public float Y { get; set; }
public float Z { get; set; }
}
public struct AreaTriggerEntry
{
public uint ID { get; set; }
public uint MapID { get; set; }
public C3Vector Position { get; set; }
public float Radius { get; set; }
public C3Vector BoxSize { get; set; }
public float BoxOrientation { get; set; }
}Metadata
Metadata
Assignees
Labels
Help wantedExtra attention is neededExtra attention is needed