-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unity scriptler arası aktüel veri aktarımı problemi! #546
Comments
@Boogeyman16 can you please type your issue in English, so that we can read it and make this issue more actionable? Thanks in advance. |
Of course I use 3 scripts in Unity. 1-)Baglan script (to connect to PLC and call data) In the Baglan script, I connect to the PLC and write the data to the "Robot2veri" class in the "Data" script. And I can instantly read the data I call from the "robot2data" class in the Baglan script. However, the data I call from the "robot2data" class in the "Veriler" script in the "ssss" script comes as '0'. The value does not change. Can you help me... Thank you for your support and interest. Note: the pictures name |
I havent touched unity for long time. But i do think that there is no reference between the robot2veri object in 'ssss' script and in 'Baglan' script. You should either add a public reference to your Baglan instance and access their rb2veri instance. (You commented that line out).
In the engine you have to create a Robot2Veri instance via the "Assets/Create" menu. Now you should be able to link that instance by using the below snippet inside the required scripts (Baglan & ssss)
|
Thanks for tour help. I wrote the code example you gave. and I created a robot2veri instance in the "Assets" section. But I don't know if I should take another step? |
unityde 3 script kullanıyorum.
1-)Baglan (PLC' ye bağlanmak için ve veriler çağırmak için)
2-)Veriler (Baglan scriptinde çağırdığım verileri buraya yazdırıyorum ve diğer scriptlerden çağırmak için kullanıyorum)
3-) ssss (Veriler scriptinden veriyi alıp kullanmak için)
Baglan scriptinde PLC ye bağlanıp verileri "Veriler" scriptindeki "Robot2veri"class' ına yazdırıyorum. ve Baglan scriptinde "robot2veri" class' ından çağırdığım veriyi anlık olarak okuyabiliyorum. Lakin "ssss" scriptinde "Veriler" Scriptindeki "robot2veri" class' ından çağırdığım veri '0' olarak geliyor. Değer değişmiyor.
Yardımcı olurmusunuz...
Gerekli ekleri sizlere paylaşıyorum.
The text was updated successfully, but these errors were encountered: