示例#1
0
    /*
     * Every item passes this method before it gets recycled
     */
    private void OnHandleRecyclePrefab(Transform prefabInstance)
    {
        PrefabPoolUtils.AddChild(_parent.gameObject, prefabInstance.gameObject);

        prefabInstance.gameObject.SetActive(false);
    }
示例#2
0
 private void OnHandleObtainPrefab(Transform prefabInstance, GameObject parent)
 {
     PrefabPoolUtils.AddChild(parent, prefabInstance.gameObject);
     prefabInstance.gameObject.SetActive(true);
 }