Visible don’t reset after reset the simulation(重置仿真器,可视并没有重置)
hi,bro.i have a question for visible. I wrote a python program to make blocks invisible.But after reset the simulation, their properties do not become visible, they remain invisible.How to make them visible after reset?
嗨,兄弟。我有一个关于可见的问题。我写了一个python程序使块不可见。但是重置模拟之后,它们的属性不变为可见时,他们仍然看不见。如何使它们在重置后可见?
You can call the function ‘OnReset’你可以调用OnReset函数
so,How do I make them invisible together那么,我怎么让他们一起隐形呢?
Hey jiangleng,
You could make a “master” script inside another component. Go to modelling tab and create a new component.
你可以在另一个组件中创建一个“主”脚本。转到建模选项卡并创建一个新组件。
Next give the component a property called “Simulation node list”
接下来,为组件提供一个名为“模拟节点列表”的属性
Click on the newly created property and start adding those components to the list.
单击新创建的属性并开始将这些组件添加到列表中。
Now you have those components within a list. Next we can create a Python script to the “new component” and loop through the list.
Then we can use boom’s code to do the same thing.
现在,列表中有了这些组件。接下来,我们可以为“新组件”创建一个Python脚本,并循环遍历该列表。
我们可以用boom的代码来做同样的事
This code snippet is inside the “new component”此代码片段位于“新组件”中。