Example #1
0
        static void StartInspectorIntegration()
        {
            var buildRoot = Assembly.GetExecutingAssembly().Location;

            for (int i = 0; i < 8; i++)
            {
                buildRoot = Path.GetDirectoryName(buildRoot);
            }

            InteractiveInstallation.InitializeDefault(true, buildRoot);

            var agentAssemblyPath = InteractiveInstallation.Default.LocateAgentAssembly(
                AgentType.MacMobile);

            Console.WriteLine("Injecting Agent Assembly");
            Console.WriteLine($"  path:  {agentAssemblyPath}");
            Console.WriteLine($"  mtime: {File.GetLastWriteTime (agentAssemblyPath)}");

            Assembly.LoadFrom(Path.Combine(
                                  Path.GetDirectoryName(InteractiveInstallation.Default.LocateAgentAssembly(AgentType.Console)),
                                  "netstandard.dll"));

            inspectorSupportType = Assembly
                                   .LoadFrom(agentAssemblyPath)
                                   .GetType("Xamarin.InspectorSupport");

            inspectorSupportType
            .GetField("AgentStartedHandler", bindingFlags)
            .SetValue(null, new Action <string> (AgentStarted));

            inspectorSupportType
            .GetMethod("Start", bindingFlags)
            .Invoke(null, null);
        }
Example #2
0
        static void StartInspectorIntegration()
        {
            var buildRoot = Assembly.GetExecutingAssembly().Location;

            for (int i = 0; i < 8; i++)
            {
                buildRoot = Path.GetDirectoryName(buildRoot);
            }

            var agentAssemblyPath = InteractiveInstallation.LocateFiles(
                new [] { Path.Combine(buildRoot, "Agents", "Xamarin.Interactive.Mac.Mobile", "bin") },
                "Xamarin.Interactive.Mac.Mobile.dll").First();

            Console.WriteLine("Injecting Agent Assembly");
            Console.WriteLine($"  path:  {agentAssemblyPath}");
            Console.WriteLine($"  mtime: {File.GetLastWriteTime (agentAssemblyPath)}");

            var netstandardAssemblyPath = InteractiveInstallation.LocateFiles(
                new [] { Path.Combine(buildRoot, "Agents", "Xamarin.Interactive.Console", "bin") },
                "netstandard.dll").First();

            Assembly.LoadFrom(netstandardAssemblyPath);

            inspectorSupportType = Assembly
                                   .LoadFrom(agentAssemblyPath)
                                   .GetType("Xamarin.InspectorSupport");

            inspectorSupportType
            .GetField("AgentStartedHandler", bindingFlags)
            .SetValue(null, new Action <string> (AgentStarted));

            inspectorSupportType
            .GetMethod("Start", bindingFlags)
            .Invoke(null, null);
        }
Example #3
0
        static Driver()
        {
            var isMac             = Environment.OSVersion.Platform == PlatformID.Unix;
            var installationPaths = isMac
                ? ClientApp.GetMacInstallationPaths()
                : ClientApp.GetWindowsInstallationPaths();

            InteractiveInstallation.InitializeDefault(
                isMac,
                DevEnvironment.RepositoryRootDirectory,
                installationPaths);
        }
Example #4
0
    void Awake()
    {
        Player localPlayer = GameObject.FindGameObjectWithTag("Control").GetComponent <Control>().GetPlayer();

        cam = localPlayer.mainCamera.transform;
        transform.position = new Vector3(cam.position.x, cam.position.y + 1.5f, transform.position.z);
        control            = localPlayer.inputControl;
        user               = localPlayer.creature;
        user.control       = null;
        installation       = user.interactionInstallation;
        InterfaceOverlayUI = GameObject.Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/InterfaceOverlays/InterfaceOverlayUI"), Vector3.zero, Quaternion.identity);
        InterfaceOverlayUI.transform.SetParent(localPlayer.mainCanvas.transform, false);
        InterfaceOverlayUI.transform.localPosition = new Vector3(0f, 192f, 0f);
        InterfaceOverlayAwake();
    }
Example #5
0
 static Driver()
 {
     InteractiveInstallation.InitializeDefault(
         Environment.OSVersion.Platform == PlatformID.Unix,
         null);
 }