Hello, I am a relatively new developer, just learning the ropes and thought this project would be a good challenge to learn and test my skills
I have installed and built a successful Rhino.Compute
as part of Junihiro Horikawas tutorial on how to port GH to a local machine. I am having difficulty getting unity to recognize my sliders in the engine, yet I can attach my TestCompute file and attach and execute the program without any errors to the open unity project, as well as my RhinoCompute.cs file.
I have noticed that my syntax in the code for my TestCompute file does not highlight Rhino. Common syntax, making me think it has something to do with the Rhino3DMio.dll not being implemented correctly… for example in visual studio on Junihiro’s video Rhino.FileIO.File3dm is highlighted and when typing is present in the drop down for different coding types… Here is my code I am specifically talking about the section where he checks his unity at 18:27 in the video :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
using Rhino.Compute;
using Rhino;
public class TestCompute : MonoBehaviour
{
public string authToken;
public Material mat;
private Rhino.FileIO.File3dm model;
private float prevHeight, prevPipeRad, prevSegments, prevAngle;
private float height = 10f;
private float pipeRad = 2f;
private int segments = 5;
private float angle = 30f;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnGUI()
{
GUI.Label (new Rect(10f, 10f, 90, 20), "Height")
height = GUI.HorizontalSlider(new Rect(100, 15, 100, 20), height 1f, 20f,);
GUI.Label(new Rect(10f, 30f, 90, 20), "Radius")
pipeRad = GUI.HorizontalSlider(new Rect(100, 35, 100, 20), pipeRad 0.5f, 5f,);
GUI.Label(new Rect(10f, 50f, 90, 20), "Angle")
angle = GUI.HorizontalSlider(new Rect(100, 55, 100, 20), pipeRad 0, 90,);
GUI.Label(new Rect(10f, 70f, 90, 20), "Segments")
segments = (GUI).HorizontalSlider(new Rect(100, 35, 100, 20), segments, 3, 8,);
}
}
Any insights into what I could be missing or what could be happening here? Let me know if there are any files you need. Thanks!
compute.rhino3d-master.zip (1.3 MB)
rhino3dmio.desktop.7.1.20343.9491.zip (10.5 MB)
RhinoCompute.cs (697.9 KB)