- Home /
CatlikeCoding 3d graphs
Hey folks,
I'm trying to follow CatlikeCoding's tutorial on 3d graphs in unity. However seems that some features are deprecated. Disclaimer: I'm not terribly experienced with unity. Here's the tutorial: http://catlikecoding.com/unity/tutorials/graphs/#a-questionmark
Rn i'm at this step of the tutorial:
Code (CSharp): void Start () {
if (resolution < 10 || resolution > 100) {
Debug.LogWarning ("Grapher resolution is out of bounds, resetting to minimum.", this);
resolution = 10;
float increment = 1f / (resolution - 1);
for (int i = 0; i < resolution; i++) {
float x = i * increment;
points [i].position = new Vector3 (x, 0f, 0f);
points [i].color = new Color (x, 0f, 0f);
points [i].size = 0.1f;
}
points = new ParticleSystem.Particle[resolution];
}
}
// Update is called once per frame
void Update () {
particleSystem.SetParticles(points, points.Length);
}
}
My error is at the line inside of Update(). This is deprecated. So i replaced it by doing:
particles = GetComponent (); (inside of Start)
Then in update i used: particles.SetParticles(points, points.Length);
However i'm getting an object reference not set to an instance of object error pointing to my Update function. Any help would be appreciated.
Your answer

Follow this Question
Related Questions
In Script Graph, Why Blackboard Object Variables are disabled but Scene Variables are not? 0 Answers
[Script Graph] Why Variable accessibility and Inspector visibility are not controlled separately? 0 Answers
Nodes in GraphView appear white. 0 Answers
Bolt - InvalidOperationException - Variable not found 0 Answers
Align content in GraphView Node 1 Answer