Created
March 5, 2018 11:14
-
-
Save czwen/a2ce89725ef6b58e6c24f90799eb581a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (SCNNode*)nodeFromDaeAtPath:(NSString*)path withIdentifier:(NSString*)identifier { | |
NSURL *urlToColladaFile = [[NSBundle mainBundle] URLForResource:path withExtension:@"dae"]; // Create NSURL from input path | |
SCNSceneSource *sceneSource = [[SCNSceneSource alloc] initWithURL:urlToColladaFile options:nil]; // Create a temporary SCNScene | |
SCNNode *node = [sceneSource entryWithIdentifier:identifier withClass:[SCNNode class]]; // Create a node from the model represented by the identifier | |
return node; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment