-
Notifications
You must be signed in to change notification settings - Fork 697
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.VisualScripting shows restricted interface in SampleWebView compared to standard script #1129
Comments
Additional clue: the interface for Unity.VisualScripting that I see in Visual Studio when editing SampleWebView.cs is this: Of course I'm expecting to see the interface detailed here: https://docs.unity3d.com/Packages/com.unity.visualscripting@1.9/api/Unity.VisualScripting.html and I do indeed see that if I use this in a newly generated C# script: |
I uploaded a modified sample app to https://github.com/gree/unity-webview/commits/example-for-1129/ , which can be opened with 2021.3.42f1. Although I'm utilizing Visual Studio on macOS, IntelliSense seems to work correctly. SampleWebView.cs should do nothing about this issue. If IntelliSense works for a newly created cs file, please try to replace the content of the newly created cs file with that of SampleWebView.cs. IntelliSense should continue to work correctly. |
Thank you very much for the update! I’m in meetings most of the day but I will give this a try later today.
…--C
Clay Helberg
Solutions Architect
EAC Product Development Solutions
(612) 474-4847
eacpds.com<https://www.eacpds.com/>
[signature_1743078878]
Transforming the way companies design, manufacture, connect to, and service their products.
From: Koji Nakamaru ***@***.***>
Sent: Saturday, January 11, 2025 1:25 AM
To: gree/unity-webview ***@***.***>
Cc: Clay Helberg ***@***.***>; Author ***@***.***>
Subject: Re: [gree/unity-webview] Unity.VisualScripting shows restricted interface in SampleWebView compared to standard script (Issue #1129)
I uploaded a modified sample app to https://github.com/gree/unity-webview/commits/example-for-1129/ , which can be opened with 2021.3.42f1. Although I'm utilizing Visual Studio on macOS, IntelliSense seems to work correctly.
image.png (view on web)<https://github.com/user-attachments/assets/6546596c-66b9-4132-a1ab-e1176d6689e0>
SampleWebView.cs should do nothing about this issue. If IntelliSense works for a newly created cs file, please try to replace the content of the newly created cs file with that of SampleWebView.cs. IntelliSense should continue to work correctly.
—
Reply to this email directly, view it on GitHub<#1129 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATGQ4LOQNLIITSTOPEN3H6L2KDBLJAVCNFSM6AAAAABU7CQ26CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBVGEZTANZUGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I am trying to use Unity.call() in my web page to set a Visual Scripting object variable so I can do something with it on the Unity side. The way I think this should work is something like this:
using Unity.VisualScripting
at the top of the scriptwebViewObject.Init()
, for the "cb" callback, add code to get the "Visual Scripts" object and use that with the Variables object to set the value:I can use this approach if I do it in a standard C# script on, say, a button, and it works fine. But when I try to modify SampleWebView.cs this way, Visual Studio shows me a very different, much more restricted set of members on Unity.VisualScripting, and doesn't recognize the Variables object. I also tried using
Unity.VisualScripting.Variables(...
but that doesn't work either.So, what is different about SampleWebView.cs that gives me a different flavor of Unity.VisualScripting? It's almost as if the script is redefining the Unity.VisualScripting namespace locally or something. Is there a way I can use the full Unity.VisualScripting namespace in the context of this script?
The text was updated successfully, but these errors were encountered: