bool loadFromResources(PGraphics g, string path) { string resPath = g.getResourceName(path); Texture2D tex = Resources.Load(resPath) as Texture2D; set(tex); if (tex != null) { PGraphics.debuglog("loadImage:loadFromResources " + resPath); if (width == 0) { width = texWidth; } if (height == 0) { height = texHeight; } } else { PGraphics.debuglogWaring("loadImage:loadFromResources <Failed> " + resPath); } return(tex != null); }
bool loadFromResources(PGraphics g, string path) { string resPath = g.getResourceName(path); Texture2D tex = Resources.Load(resPath) as Texture2D; set(tex); if (tex != null) { PGraphics.debuglog("loadImage:loadFromResources " + resPath); if (width == 0) width = texWidth; if (height == 0) height = texHeight; } else { PGraphics.debuglogWaring("loadImage:loadFromResources <Failed> " + resPath); } return tex != null; }