Hi
private BSplineMath bmath = new BSplineMath();
I get an error that i should use createinstance:
static ScriptableObject CreateInstance(string className);
I’m new to cs only very little c++ hence how to write with createinstance?
Thanks
BSplineMath bmath = ScriptableObject.CreateInstance(“BSplineMath”);
Thanks, that’s what I get now:
Assets/BSplineSurface.cs(36,46): error CS0266: Cannot implicitly convert type UnityEngine.ScriptableObject' to
BSplineMath’. An explicit conversion exists (are you missing a cast?)
BSplineMath bmath = ScriptableObject.CreateInstance("BSplineMath") as BSplineMath;
Again thanks. Now I get:
CreateInstance can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don’t use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
Do I need to put that all in one class or can I leave it in another cs file like I have it now?
Thanks in advance
you need to show us more code, what does BSplineMath actually do? is it a scriptable object? I don’t think it actually is? we need more information
Well for now I only try to get this running as new project:
New groundplane and camera and integrated the above into groundplane.
Later I want to integrate that with (indie):
http://scrawkblog.com/2013/02/24/ocean-renderer-for-unity/
Thanks for your help, much appreciated.