public static EmitterPool CreateEmitterPool(ParticleSystem emitter, EmitterReturnedToPool emitterReturnedToPool) { EmitterPool result = null; if (emitter != null) { GameObject gameObject = emitter.gameObject; while (gameObject.transform.parent != null) { gameObject = gameObject.transform.parent.gameObject; } ParticleSystem[] allEmitters = MultipleEmittersPool.GetAllEmitters(gameObject); if (allEmitters.Length > 1) { result = new MultipleEmittersPool(gameObject, emitterReturnedToPool); } else { result = new SingleEmitterPool(emitter, emitterReturnedToPool); } } return(result); }
public unsafe static long $Invoke0(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(EmitterPool.CreateEmitterPool((ParticleSystem)GCHandledObjects.GCHandleToObject(*args), (EmitterReturnedToPool)GCHandledObjects.GCHandleToObject(args[1])))); }