Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. Inventory component = controller.GetComponent<Inventory>();
  2. InventoryItem result;
  3. if (component != null && component.activeItem != null && component.activeItem.datablock != null)
  4. {
  5. result = (InventoryItem)component.activeItem;
  6. }
  7. else
  8. {
  9. result = null;
  10. }
  11. return result;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement