Frage

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?

War es hilfreich?

Lösung

[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]];
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top