Search Unity

How to access my own namespace from MRTK script?

Discussion in 'Scripting' started by Albertkaruna, Aug 2, 2019.

  1. Albertkaruna

    Albertkaruna

    Joined:
    Apr 12, 2015
    Posts:
    9
    I have my own namespace with some scripts, i need to call some method from MRTK scripts. But it doesn't allow to include outer namespaces. Holotools was not had this problem.


    I added assembly from other project it's working fine but i need to access the script within the project.
     
  2. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    MRTK assembly can not refernce player assembly because player assembly already references MRTK, otherwise you wouldn't be able to use MRTK scripts in Unity project. Thus, assemblies can not have recursive references. To overcome this limitation there are events. Add event where you want to call your scripts and let your scripts subscribe.
     
    Albertkaruna likes this.
  3. Albertkaruna

    Albertkaruna

    Joined:
    Apr 12, 2015
    Posts:
    9
    Thank you, it's working.