Skip to content
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

WorldUI not receiving clicks #19

Open
philfleck opened this issue Jan 17, 2019 · 1 comment
Open

WorldUI not receiving clicks #19

philfleck opened this issue Jan 17, 2019 · 1 comment

Comments

@philfleck
Copy link

Hi again,
i am using MyPointer = new CameraPointer(Camera.main, 0.5f, 0.5f); as described in the wiki to handle the clicks. The main part of the UI is using a Canvas (world-space) with the HtmlUIPanel attached to it.

Now i am dinamically creating a ``WorldUI`. Something like:

                   var wu = new WorldUI(pName, width, height);
                    wu.PixelPerfect = pixelPerfect;
                    wu.transform.parent = parent.transform;
                    //wu.transform.localScale = objectScale;
                    wu.AcceptInput = allowInput;
                    wu.AlwaysFaceCamera = alwaysFaceCamera;
                    
                    if (isUrl)
                    {
                        wu.document.location.href = content;
                    }
                    else
                    {
                        wu.document.innerHTML = content;
                    }
                    
                    
                    wu.SetOrigin(origin.x, origin.y);

                    wu.transform.localPosition = parentOffset;
                    wu.SetResolution(3750);
                    wu.UpdateResolution();

Everithing works so far. Also the scale is working. AcceptInput is set to true.

The problem is that i am not receiving clicks or hovers on the created world-ui. Btw, the world-ui is not moving.

As i understood, it should work with the CameraPointer, but i also found the LaserPointer example.

Any suggestion? Did i miss something?
Thanks a lot for any help.

As a side note: So far i am very pleased with PowerUI - it is realy versatile and not to hungry.

best
-p

@philfleck
Copy link
Author

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant