K Kirshor Member Jul 15, 2020 #1 Hi, I wish the class Item.cs has a methob similar as below: GameObject droppedObj=item.Drop(); I need to get the droppedObj to do something on it. What is the best way to get a dropped object like that. Thanks
Hi, I wish the class Item.cs has a methob similar as below: GameObject droppedObj=item.Drop(); I need to get the droppedObj to do something on it. What is the best way to get a dropped object like that. Thanks
Andrew Well-known member Jul 15, 2020 #2 Unfortunately Item.cs does not have a method to do this directly. Look for the following line in Item.Drop: C++: var spawnedObject = ObjectPool.Instantiate(m_DropPrefab, dropPosition, dropRotation); spawnedObject is what you're looking for.
Unfortunately Item.cs does not have a method to do this directly. Look for the following line in Item.Drop: C++: var spawnedObject = ObjectPool.Instantiate(m_DropPrefab, dropPosition, dropRotation); spawnedObject is what you're looking for.