CustomArgumentExample.cs 973 B

12345678910111213141516171819202122232425262728293031
  1. // This should be editor only
  2. #if UNITY_EDITOR
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. namespace ParrelSync.Example
  7. {
  8. public class CustomArgumentExample : MonoBehaviour
  9. {
  10. // Start is called before the first frame update
  11. void Start()
  12. {
  13. // Is this editor instance running a clone project?
  14. if (ClonesManager.IsClone())
  15. {
  16. Debug.Log("This is a clone project.");
  17. //Argument can be set from the clones manager window.
  18. string customArgument = ClonesManager.GetArgument();
  19. Debug.Log("The custom argument of this clone project is: " + customArgument);
  20. // Do what ever you need with the argument string.
  21. }
  22. else
  23. {
  24. Debug.Log("This is the original project.");
  25. }
  26. }
  27. }
  28. }
  29. #endif