Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public struct PlayerData {
  2. public int compensator;
  3. public int silencer;
  4. ...
  5. }
  6.  
  7. string attachmentName = "compensator";
  8.  
  9. if (PlayerData[attachmentName]) {
  10. weapon[attachmentName].gameObject.SetActive(true);
  11. }
  12.  
  13. weapon[attachmentName].gameObject.SetActive(true);
  14.  
  15. if (PlayerData[attachmentName]) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement