You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to register my own object MyPos in go code, a struct like this.
golang code:
type MyPos struct {
X, Y int
}
And provide a newMO() function to return this object. I hope that the members of this object can be accessed in the script, but I do not want to register this object in the script, for example:
But a new problem has arisen. The values of members in the native object cannot be changed in the script. What method can be used to solve this problem?
I want to register my own object MyPos in go code, a struct like this.
golang code:
And provide a newMO() function to return this object. I hope that the members of this object can be accessed in the script, but I do not want to register this object in the script, for example:
script code:
Please tell me how to do this. Thx!
The text was updated successfully, but these errors were encountered: