-- 编辑器用到的资源 local find = GameLab.Find local Shader = find "GameLab.Engine.Rendering.Shader" local Texture = find "GameLab.Engine.Rendering.Texture" local Rendering = find "GameLab.Engine.Rendering" local SHADER = function(path) local file = 'Resources/Shaders/' .. path return Rendering.CreateShaderFromFile(file) end local TEXTURE = function(path) -- local file = define.builtInPath .. '/Resources/Images/' .. path -- return Rendering.CreateShaderFromFile(file) end local res = {} local loadRes = function() res.shaders = { ["EditorShape"] = SHADER "Editor-Shape.glsl", ["EditorText"] = SHADER "Editor-Text.glsl", ["EditorUI"] = SHADER "Editor-UI.glsl", } end GameLab.onApplicationStart:Add(loadRes) return res