using System.Collections; using System.Collections.Generic; using Lean.Pool; using UnityEngine; namespace Ichni.RhythmGame { public class SubstantialObject : BaseElement { public string themeBundleName, objectName; public static SubstantialObject GenerateElement(string elementName, string themeBundleName, string objectName, Vector3 position, Vector3 eulerAngles, Vector3 scale, BaseElement parent, bool isFirstGenerated = true) { GameObject themeBundleObject = ThemeBundleManager.instance.GetObject(themeBundleName, objectName); SubstantialObject substantialObject = LeanPool.Spawn(themeBundleObject, parent.transform).GetComponent(); substantialObject.NewInitialize(elementName); return substantialObject; } } }