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 invisib[网]le togethe[淘]r那么,我怎么[巴]让他们一起隐形[文]呢?
Hey jiangleng,
You could make a “[章]master&[来]rdquo; script inside another[自] compone[网]nt. Go to modelli[淘]ng tab and create a new compone[巴]nt.
你可以在另一个组件中创建一个“主”脚本。转到建模选项卡并创建一个新组件。
Next give the compone[文]nt a propert[章]y called “[来]Simulat[自]ion node list&rd[网]quo;
接下来,为组件[淘]提供一个名为&[巴]ldquo;模[文]拟节点列表&r[章]dquo;的属[来]性
Click on the newly created[自] propert[网]y and start adding those compone[淘]nts to the list.
单击新创建的属[巴]性并开始将这些[文]组件添加到列表[章]中。
Now you have those compone[来]nts within a list. Next we can create a Python script to the “[自]new compone[网]nt&rdqu[淘]o; and loop through[巴] the list.
Then we can use boom&rs[文]quo;s code to do the same thing.
现在,列表中有[章]了这些组件。接[来]下来,我们可以[自]为&ldquo[网];新组件&rd[淘]quo;创建一[巴]个Python[文]脚本,并循环遍[章]历该列表。
我们可以用bo[来]om的代码来做[自]同样的事
This code snippet is inside the “new component”此代码片段位于“新组件”中。
本文链接:https://www.wtao8.com/post/210.html 转载需授权!