public static void Release([NotNull] VisualEffect prefab, [NotNull] VisualEffect instance) { if (s_pool == null) { Object.Destroy(instance.get_gameObject()); } else { s_pool.Release(prefab.get_gameObject(), instance.get_gameObject()); } }
public static VisualEffect Instantiate([NotNull] VisualEffect prefab, Vector3 position, Quaternion rotation, Vector3 scale, [CanBeNull] Transform parent) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) GameObject val = (s_pool != null) ? s_pool.Instantiate(prefab.get_gameObject(), position, rotation, parent) : ((null == parent) ? Object.Instantiate <GameObject>(prefab.get_gameObject(), position, rotation) : Object.Instantiate <GameObject>(prefab.get_gameObject(), position, rotation, parent)); Transform transform = val.get_transform(); Vector3 localScale = transform.get_localScale(); localScale.Scale(scale); transform.set_localScale(localScale); return(val.GetComponent <VisualEffect>()); }