Skip to content

Conversation

@ophura
Copy link
Contributor

@ophura ophura commented Sep 28, 2025

these changes enable support for expression-bodied constructors, such as:

public class UserDefinedClass
{
    private readonly int _value;

    // NOTE: this now compiles
    public CustomUserClass(int value) => _value = value;
}

the above code as is fails in the current implementation, the proposed modification fixes the failure.

additionally, I further proposed other changes regarding the internal UdonSharpInternalUtility.GetTypeID utilitarian subroutine, those changes preserve the previous behaviour of the subroutine; therefore the changes are benign. it is mainly for modernization reasons (although it is slightly more performant).

is SHA256 really needed for the purpose of hashing? if not, will it be a breaking change to use a much more efficient algorithm?
I had XxHash64.HashToUInt64 (from System.IO.Hashing) in mind as a much, much faster and memory efficient alternative; if there isn't much interest in improving performance, then don't mind my suggestion.

Copy link

@Deantwo Deantwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

Not sure why you changed // to /* */ though.

@ophura
Copy link
Contributor Author

ophura commented Oct 1, 2025

@Deantwo I don't exactly remember... I think I tried to uncomment it to see what the IDE (VS) had to suggest, and then reapplied the comment using CTRL + SHIFT + / once I was done with it. the /* ... */ comment style was the one pick by the IDE... yeah, that's probably what happened. I can revert it to the more idiomatic commenting style if it's necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants