Exemple #1
0
 static ActorAttachArgs()
 {
     Default = new ActorAttachArgs
     {
         resetLocalPosition = true,
         resetLocalRotation = true,
         resetLocalScale    = true
     };
 }
Exemple #2
0
 public bool Attach(IActorAttachment attachment, object context, ActorAttachArgs args)
 {
     DebugUtility.AssertFormat(attachment.owner == null, "The owner of attachment ({0}) must be null (Actor : [{1}])", attachment.name, name);
     if (FindJoint(attachment.jointName, true, out var info))
     {
         info.attachments.Add(attachment);
         attachment.OnAttach(this, context, args);
         return(true);
     }
     return(false);
 }