|
grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » FindTexture(string) |
Version 2.2 |
FindTixture 関数は、そのテクスチャが存在する場合、入力テキスト文字列に一致するテクスチャへのハンドルを返します。
"button" というテクスチャに関する情報を Dump() 関数で出力します。
Lua |
return function () -- Set a texture name. local textureName = "button" -- Get the handle of the texture. local textureHandle = FindTexture(textureName) -- Check if textureHandle returned something and provide feedback. if textureHandle == nil then ErrPrintf("Texture does not exist.") else Printf("=============== START OF DUMP ===============") FindTexture(textureName):Dump() Printf("================ END OF DUMP ================") end end |