Guest User

japanesegarden to watertower

a guest
May 4th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. BuildingInfo jpgarden = default (BuildingInfo);
  2. BuildingInfo watertower = default (BuildingInfo);
  3. BuildingCollection[] bclns = UnityEngine.Object.FindObjectsOfType<BuildingCollection>();
  4. foreach (BuildingCollection bcln in bclns)
  5. {
  6. foreach (BuildingInfo info in bcln.m_prefabs) {
  7. if (info.name == "JapaneseGarden"){
  8. jpgarden = info;
  9. }
  10. if (info.name == "Water Tower"){
  11. watertower = info;
  12. }
  13. }
  14. }
  15. jpgarden.m_buildingAI = watertower.m_buildingAI;
  16. jpgarden.m_class = watertower.m_class;
Advertisement
Add Comment
Please, Sign In to add comment