Python components script access #1688
pyblendnet-js
started this conversation in
Ideas/Features for UPBGE 0.3+
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like an easy way to access an existing component script from the Game Object Properties panel. Unity has a button to open scripts linked to an object but I don't need anything that fancy. As a UPBGE newbie, it took me some experimentation to discover how to open an embedded component script.
In the UPBGE documentation, it says you can Add or Create a component.
For Add, you either use a template from the script menu, or write your own class in the text editor (the documentation for templates actually refers to a Register button, which I assumed to the Add button, but I now see there is a Register check box under text editor->text which causes the script to run on loading), so in this instance, it is obvious where the script can be found.
For Create, I didn't realize that you needed to have a Text Editor panel open first in order for the created component script to appear. But having crossed that hurdle, it was again obvious where the component class lived.
Once the component is added/created, only the class name appears in the Game Components list. There is nothing to tell me to which script this Component is linked. If I open a blend file with an embedded script, the only way to find where the Component script is located is to open a Text Editor and either use the "Browse Text to be Linked" drop down, or to open the scripts from the Outliner->OrphanData list.
Rather than a button to open a text editor on a components script source, I would be happy if the drop down button next to the component name listed the source script name.
I am very new to UPBGE and the last time I looked seriously at scripting for Blender was for version V2.49. I am more familiar with object oriented programming using dotnet and python, so Python Components appeals to me more than using Logic Bricks or Nodes.
I am currently using UPBGE 0.30.0 under Kubuntu (NAME="Ubuntu" VERSION="20.04.4 LTS)
Beta Was this translation helpful? Give feedback.
All reactions