Topic: custom Tooltip

Hi
i was trying to create a custom tooltip as shown in the atlas example : Drawing tooltip using uGUI Example .
but there was some errors (assigning the Canvas) maybe cause i am using the Texture Control .
so how can i use that example and using the Texture Control . and what is the alternative of the Canvas .
i hope you understand my problem and what i am using and meaning .

Re: custom Tooltip

Hello.

Please attach the full stack trace of the exception.

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-10-07 09:41:40)

Re: custom Tooltip

what does thats mean ?

Post's attachments

Attachment icon 111111.png 265.4 kb, 3 downloads since 2019-10-07 

Re: custom Tooltip

Open the console (Window / Console).
Select the line with the exception.
Copy the full contents of the exception, and paste it here.

Kind Regards,
Infinity Code Team.

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

Re: custom Tooltip

if i assign my main canvas its work without error and it instantiate it under the main canvas but not on the map . and cant show it on the map

Re: custom Tooltip

sorry .. error happened when i try to assign the map as the canvas "i know its not correct " but i cant find witch canvas to assign .

Re: custom Tooltip

I found an old video about uGUI Tooltips:
https://www.dropbox.com/s/j5cwvch2e5v90 … 1.mp4?dl=0
Hope this helps you understand what is wrong.

Kind Regards,
Infinity Code Team.

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

8 (edited by tamim.ali.zoabi 2019-10-07 10:33:40)

Re: custom Tooltip

yes .. i understand that ..
but this is a way with a tilemap
i am using a texture map

i try to change : public Canvas container; to public GameObject Container ;
and assign the map as the container the in Mouse Hover its give me that :

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.RectTransformUtility.ScreenPointToWorldPointInRectangle (UnityEngine.RectTransform rect, UnityEngine.Vector2 screenPoint, UnityEngine.Camera cam, UnityEngine.Vector3& worldPoint) (at C:/buildslave/unity/build/Modules/UI/ScriptBindings/RectTransformUtility.cs:23)
UnityEngine.RectTransformUtility.ScreenPointToLocalPointInRectangle (UnityEngine.RectTransform rect, UnityEngine.Vector2 screenPoint, UnityEngine.Camera cam, UnityEngine.Vector2& localPoint) (at C:/buildslave/unity/build/Modules/UI/ScriptBindings/RectTransformUtility.cs:37)
GuiToolTip.OnUpdateLate () (at Assets/Scripts/Gps_Script/GuiToolTip.cs:39)
OnlineMaps.Update () (at Assets/Infinity Code/Online maps/Scripts/OnlineMaps.cs:1366)

Re: custom Tooltip

First, it doesn't matter which Control is used.
Secondly, there should be a reference to Canvas.
Replacing this to GameObject and setting the wrong reference, you broke the logic of the script.
Bring it back to Canvas, and set the correct reference.

Kind Regards,
Infinity Code Team.

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

Re: custom Tooltip

i Bring it back to Main Canvas . work will but doesnt show any tooltip."prefab instantiated".

11 (edited by tamim.ali.zoabi 2019-10-07 11:23:28)

Re: custom Tooltip

i discovered that its show the tooltip under the map . when accedantly i was scaled the scene .the tool tip was big and shown under the map . "label=Hellow World"

Post's attachments

Attachment icon 111111.jpg 211.05 kb, 1 downloads since 2019-10-07 

Re: custom Tooltip

So any suggestion what to do ?

Re: custom Tooltip

Texture Control is not a UI element. Why did you place this in a Canvas?

Create a second Canvas with Render Mode - Screen Space - Overlay, and use this as a container for tooltips.

Kind Regards,
Infinity Code Team.

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