Skip to content

WorldUI not receiving clicks #19

@philfleck

Description

@philfleck

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions