I am getting an error for this block of code:
_bloodEmitter = NSKeyedUnarchiver.unarchiveObjectWithFile(NSBundle.mainBundle().pathForResource("Blood", ofType:"sks"));
The error I get is: "Could not find an overload for 'pathForResource' that excepts the supplied arguments"
The documentation reads:
func pathForResource(_ name: String?,
ofType extension: String?) -> String?
Why am I getting this error?
Try unwrapping the filePath:
_bloodEmitter = NSKeyedUnarchiver.unarchiveObjectWithFile(NSBundle.mainBundle().pathForResource("Blood", ofType: "sks")!)