Topic: PhotonView use

HI ...
i want to display every remark i create on other player screen .so i am using PUN2 .
so usually i am adding a photonview component to the gameobject that i want to view for all ..
my question is how can i add the photonview component to the Remark .
i wont add the photonview component to the online map that contain the Remark .

Re: PhotonView use

Hello.

This works differently, and if you just add PhotonView it will not work correctly.
How to use Photon PUN2 for markers:
https://forum.infinity-code.com/viewtopic.php?id=936

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

3 (edited by tamim.ali.zoabi 2019-09-19 16:40:15)

Re: PhotonView use

Thanks Alex .. it was easy
1-  But if i draw a rout and later i want to delete it for creating another one ..how do i delete it ?

    should i delete all the parts like :
       foreach (OnlineMapsGoogleDirectionsResult.Leg leg in result.routes[0].legs)
           {
               foreach (OnlineMapsGoogleDirectionsResult.Step step in leg.steps)
               {
                   Debug.Log(step.string_instructions);
               }
          }

or just destroy : result.routes[0]
or its is else ?

---------------------------
2-   what is the index in (result.routes[0]) ?

3- when i used and set a 3D Marker .. there is a 2 problems
1- the marker "Prefab" moved and change its location by moving the map with the mouse cursor and by zooming .its not
    sensitive like the 2D Marker ?
2- i used your function to scale the 3D Marker when zooming . but the result wasn't ok ?

your Function :
using UnityEngine;

public class TestScale3DMarkers : MonoBehaviour
{
    public float defaultZoom = 3;
    public GameObject prefab;
    private OnlineMapsMarker3D marker;

    private void Start ()
    {
        marker = OnlineMapsMarker3DManager.CreateItem(OnlineMaps.instance.position, prefab);

        OnlineMaps.instance.OnChangeZoom += OnChangeZoom;
        OnChangeZoom();
    }

    private void OnChangeZoom()
    {
        marker.scale = Mathf.Pow(2, OnlineMaps.instance.floatZoom - defaultZoom);
    }
}

Re: PhotonView use

1. OnlineMapsDrawingElementManager.RemoveItem(route);

2. The response from Google Directions API may contain alternate routes.
In this example, only the main route is used.

3.1. Unfortunately, I did not understand this problem.
Please rephrase this in more detail.

3.2. Most likely the problem is that you are using the wrong defaultZoom.
The latest versions of Online Maps have a much easier way:

marker3D.sizeType = OnlineMapsMarker3D.SizeType.realWorld;
marker3D.scale = SOME_VALUE;
Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: PhotonView use

But I can use RPC function  for updating players location every some seconds ? Inistid of hashting

Re: PhotonView use

Theoretically - you can do it.
Practically - why do you need to do this?

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

7 (edited by tamim.ali.zoabi 2019-09-20 19:24:29)

Re: PhotonView use

1-its more easy for me :-)
    is there any difference between using hashtable and RPC ?
2-is there any example about rotating map while driving and keep marker strait "i hope you understood me"
3- how can i update my Marker location continually while moving "Driving" ...any example

Re: PhotonView use

1. It will not be easier, because in any case you will need to transfer the coordinates.
I think hashtable and RPC have the same (pretty low) usage complexity.
2. http://infinity-code.com/atlas/online-m … ample.html
3. This happens automatically if you create a marker using Online Maps Location Service.
If you create a marker manually:
http://infinity-code.com/atlas/online-m … ample.html

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: PhotonView use

Hi ..
when i move the mouse over the marker its show the marker label ..
the marker label Font is too small .
is there any way to control the size of that font.

Re: PhotonView use

http://infinity-code.com/atlas/online-m … ample.html
http://infinity-code.com/atlas/online-m … ample.html

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!