Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. SkillLocator skillComponent = BodyCatalog.FindBodyPrefab("BanditBody").GetComponent<SkillLocator>();
  2.  
  3. SkillDef primaryDef = SkillDef.CreateInstance<SkillDef>();
  4. //Set the parameters of primaryDef
  5.  
  6. SkillDef primaryShotgunDef = SkillDef.CreateInstance<SkillDef>();
  7. //Set the parameters of primaryShotgunDef
  8.  
  9. SkillFamily.Variant[] primaryVariants = new SkillFamily.Variant[2];
  10. primaryVariants[0].skillDef = primaryDef;
  11. primaryVariants[0].unlockableName = "";
  12. primaryVariants[1].skillDef = primaryShotgunDef;
  13. primaryVariants[1].unlockableName = "";
  14. skillComponent.primary.skillFamily.variants = primaryVariants;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement