I am writing my own Quartz Composer plugin and I would like to load GLSL shaders, textures, etc. from my QC plugin's bundle. The problem is that it appears that I am getting my loading application's (the QC runtime app) bundle instead. I tried iterating through all of my bundles but this didn't seem to work either.

Is there any easy way to access my QC bundle directly?

有帮助吗?

解决方案

[NSBundle mainBundle] gives you the application bundle, not the plugin bundle.

From within a plugin's class, you could do this to get the plugin's bundle:

NSBundle *thisBundle = [NSBundle bundleForClass:[self class]];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top