17-06-2020, 03:54 PM
I'm trying to add ObiSkinnedCloth and reference skinnedClothBlueprint
var gameObj = meshObject.AddComponent<ObiSkinnedCloth>();
gameObj.skinnedClothBlueprint = ScriptableObject.Instantiate(SourceBlueprint.instance.sourceTop);
meshObject.AddComponent<ObiSkinnedClothRenderer>();
But I'm getting
NullReferenceException: Object reference not set to an instance of an object
I believe the problem is:
gameObj.skinnedClothBlueprint = ScriptableObject.Instantiate(SourceBlueprint.instance.sourceTop);
var gameObj = meshObject.AddComponent<ObiSkinnedCloth>();
gameObj.skinnedClothBlueprint = ScriptableObject.Instantiate(SourceBlueprint.instance.sourceTop);
meshObject.AddComponent<ObiSkinnedClothRenderer>();
But I'm getting
NullReferenceException: Object reference not set to an instance of an object
I believe the problem is:
gameObj.skinnedClothBlueprint = ScriptableObject.Instantiate(SourceBlueprint.instance.sourceTop);