Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add cloth and runtime
#1
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);
Reply


Messages In This Thread
Add cloth and runtime - by renderlux - 17-06-2020, 03:54 PM
RE: Add cloth and runtime - by josemendez - 17-06-2020, 05:07 PM
RE: Add cloth and runtime - by renderlux - 18-06-2020, 10:12 AM
RE: Add cloth and runtime - by josemendez - 18-06-2020, 10:14 AM
RE: Add cloth and runtime - by renderlux - 18-06-2020, 02:34 PM
RE: Add cloth and runtime - by josemendez - 18-06-2020, 03:40 PM