문제

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