Skip to content

Override ToString() method in Vulkan object structs #2298

@tonisimakov99

Description

@tonisimakov99

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions