GetPath

Returns the file path the Asset was loaded from.

Syntax

Returns

Returns the asset's file path.

Example

window=Window:Create()
context=Context:Create(window)
world=World:Create()
camera = Camera:Create()
local light = DirectionalLight:Create()
light:SetRotation(35,45,0)

--Load an asset
texture = Texture:Load("Materials/Grass/grass01.tex")

while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end

Time:Update()
world:Update()
world:Render()

--Display the asset name on screen
context:SetBlendMode(Blend.Alpha)
context:DrawText(texture:GetPath(),2,2)
context:SetBlendMode(Blend.Solid)

--Draw the teture on screen
context:DrawImage(texture,0,20)

context:Sync()
end