Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. int indice;
  2. public Button Ant;
  3. public ScriptName Script;
  4.  
  5. void Start() {
  6. call();
  7. }
  8.  
  9. void call() {
  10. if (indice <= 0) { indice = 0; }
  11.  
  12. if (indice >= 1) {
  13. indice = 1;
  14. }
  15.  
  16. if (indice == 0)
  17. {
  18. Ant.GetComponent<ScriptName>().anteriorobj();//assim não funciona
  19. Ant.GetComponent<Script>().anteriorobj();//assim tambem não funcioa
  20. }
  21. else if (indice == 1)
  22. {
  23. //blablabla
  24. }
  25. }
  26.  
  27. public class ScriptName : MonoBehaviour {
  28. public void anteriorobj()
  29. {
  30. Debug.Log("Active");
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement