playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
PhotonViewGetID - How to find GameObject by this ID?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: PhotonViewGetID - How to find GameObject by this ID? (Read 14326 times)
ermak
Junior Playmaker
Posts: 60
PhotonViewGetID - How to find GameObject by this ID?
«
on:
January 19, 2015, 08:21:16 AM »
Hi,
"GameObject" type can't be send over Photon network. "Network Sync" checkbox is inactive in "Variables" panel. Only: int, float, string... types can be send over network. OK
I trying with "PhotonViewGetID"
https://hutonggames.fogbugz.com/default.asp?W917
on
"Master client"
to get "PhotonView ID"... and i can send this ID as
Int or String to "others". But how after this on
"Not Master client"
i can FIND this object by PhotonView ID and save to GameObject variable?
And in general what is the purpose of "PhotonViewGetID" action if there is
no "Photon Find" action?
Logged
600
Moderator
Hero Member
Posts: 715
Re: PhotonViewGetID - How to find GameObject by this ID?
«
Reply #1 on:
January 19, 2015, 08:45:18 AM »
Hi,
I do this by looping through Player Count and compare their IDs with received one.
Maybe there are better solutions, but this works.
Logged
-
Car and Traffic
Playmaker assets
-
Flashing Lights: Police, Fire, EMS
[Steam]
-
YouTube
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: PhotonViewGetID - How to find GameObject by this ID?
«
Reply #2 on:
January 19, 2015, 01:15:59 PM »
Hi,
I have this in my drawer. An action that get a gameobject by id. Please bump me early february, I'll share it.
This is useful to send an rpc and reference a gameobject. it works really well.
Bye,
Jena
Logged
ermak
Junior Playmaker
Posts: 60
Re: PhotonViewGetID - How to find GameObject by this ID?
«
Reply #3 on:
February 14, 2015, 02:01:59 PM »
Quote from: jeanfabre on January 19, 2015, 01:15:59 PM
Please bump me early february, I'll share it
I bump this topic by request of jeanfabre.
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: PhotonViewGetID - How to find GameObject by this ID?
«
Reply #4 on:
February 16, 2015, 03:05:22 AM »
Hi,
Please find the action in
this package
It will be shipped with the next build of the PlayMaker Photon package.
Bye,
Jean
Logged
Numster
Playmaker Newbie
Posts: 9
Re: PhotonViewGetID - How to find GameObject by this ID?
«
Reply #5 on:
October 30, 2019, 01:14:50 PM »
This action works like a charm for PUN 1, but does not for the new PUN 2...
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: PhotonViewGetID - How to find GameObject by this ID?
«
Reply #6 on:
November 01, 2019, 04:07:17 AM »
Hi,
Can you detail what doesn't work? the action simply return the viewId of a gameobject, nothing more, so I am not sure what doesn't work for you.
can you also compare the viewId shown in the photonView of the gameobject and check if it matches or not. For me it matches.
Bye,
Jean
Logged
Numster
Playmaker Newbie
Posts: 9
Re: PhotonViewGetID - How to find GameObject by this ID?
«
Reply #7 on:
November 02, 2019, 04:37:28 AM »
Yes, this one works. But, we asked for find a gameobject by a viewID, not the view ID to a gameobject. With Pun Classic, we just had to use the "Find by view ID" action. In Pun 2, I haven't find the same action.
Personally, I used your "old" version of this action but with the new method to find a photon view and that's works for me.
(I shared it within this post)
Sorry for my bad english
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: PhotonViewGetID - How to find GameObject by this ID?
«
Reply #8 on:
November 05, 2019, 01:53:23 AM »
Hi,
ok, I see, it's because I still have a few actions to port from PUN Classic.
The findByViewID will be in the next release. It's already in the code base ( thanks for sharing the action).
Bye,
Jean
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
PhotonViewGetID - How to find GameObject by this ID?