Function onViewportDragAndDropBuiltIn

  • Adds out-of-the-box drag and drop functionality to built-in subclasses of Resource when the user drags the resource from the library to a scene viewport.

    Simply apply the decorator to a static method that is called when the resource was dropped on a SceneObject.

    The following example shows a potential implementation:

    \@onViewportDragAndDrop(PhysicsMesh)
    public static onPhysicsMeshViewportDragAndDrop(resource: MyCustomResource, sceneObject: SceneObject)
    {
    }

    Type Parameters

    Parameters

    Returns AttributeDecorator<Attribute>