I am using Minions Art grass system, I want to be able to call and regenerate the current mesh on line 301 from another script, I cant find a way to interact with anyhting on this script from another one, so when I generate my mesh, it generates the grass
https://www.patreon.com/posts/grass-system-urp-83683483
Im also using sebastian lagues procedural generation tutorial, using the falloff map
https://www.youtube.com/watch?v=wbpMiKiSKm8&list=PLFt_AvWsXl0eBW2EiBtl_sxmDtSgZBxB3
Im adding a pastebin link so you all can see the code:
[https://pastebin.com/rqcTdUyQ][1]
A bit hard to tell from your question and a huge code snippet.
In general: By making the method
public staticso it can be called from anywhere (assuming the wrapping type is visible of course) ... might need to refactor a bit to not rely on any instance fields but rather take parameters (usingref/outwhere required)I didn't count the lines but I will just assume you are referring to
CreateNewGrassObject(it's the only non-drawer related thing you included in your question)So I would convert this to
all other local values are available then as well anyway via e.g.
Since it contains no editor specific code, you might even consider to move this out into a helper class like
so it could be available even in a build.