Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Override ToString() method in Vulkan object structs #2298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tonisimakov99 opened this issue Oct 9, 2024 · 1 comment
Closed

Override ToString() method in Vulkan object structs #2298

tonisimakov99 opened this issue Oct 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@tonisimakov99
Copy link

Override ToString() method in Vulkan object structs

[NativeName("Name", "VkSemaphore")]
public struct Semaphore
{
    [NativeName("Type", "")]
    [NativeName("Type.Name", "")]
    [NativeName("Name", "")]
    public ulong Handle;

    public Semaphore(ulong? handle = null)
    {
        this = default(Semaphore);
        if (handle.HasValue)
        {
            Handle = handle.Value;
        }
    }

    public override string ToString()
    {
        return Handle.ToString();;
    }
}

it's useful for debug
Image

@Perksey
Copy link
Member

Perksey commented Oct 9, 2024

Good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants