taskMgr question

When I do…


taskMgr.add(myTask, 'name')

Then the func is…

myTaskFunc(task)
  pass

However if I do…


taskMgr.add(myTask, 'name', extraArgs = [myArg])

I can only do…

myTask(myArg)
  pass

The “task” bit does not get passed when setting extraArgs. I was wondering that if this is by deisgn, what the reason would be for it?

Thanks in advance.

did you try adding task to the list of extraArgs?

this explains a little

https://discourse.panda3d.org/viewtopic.php?t=3

@kmensah, I dont really need it just found it odd that it was not included :slight_smile:

@russ, thanks for that. I think it needs a mention in the manual :wink: