Home > other >  Of the new questions: use the preset. ApplyTo returns false, a great god know what's going on
Of the new questions: use the preset. ApplyTo returns false, a great god know what's going on

Time:09-30

18 version upgrade to found a Preset function can be used to save the component information, I will use the code component information saved into a Preset, use Preset. ApplyTo assignment to another component, but the assignment failed, with great god know what this is?
Code:
DynamicBone boneDest=TargetTrans. GameObject. GetComponent (a);
If (boneDest==null)
{
BoneDest=TargetTrans. GameObject. AddComponent (a);
}

Bool succcess=preset. ApplyTo (boneDest);

CodePudding user response:

Problem solved, the problem goes above the preset
Preset=new preset (AssetDatabase. LoadAssetAtPath Invalid (pathArry [0])
Preset=AssetDatabase. LoadAssetAtPath (pathArry [0])
  • Related