How to resize and reposition UI/canvas based on browser window size?

how can i resise and reposition my ui when we change the brower window size? i want it it adjust according to window size. can we do that using typescript code? what API can we use ?

Original Post on Discord

by user 546555823451668481

Are you using screenspace ui? You should be able to just use the anchoring options in the RectTransform

I’m using world space, as screenspace is not for needle, i guess

by user 546555823451668481

What do you mean by “as screenspace is not for needle” ?

when the project opens on browser it shows that screenspace is not supported

by user 546555823451668481

Which version are you using?

It was added in a version in 3.x

I’m using a version from 4 months back

by user 546555823451668481

how to update it btw?

by user 546555823451668481

Either using Unity’s PackageManager or by checking the footer of the ExportInfo component. It should show a button when an update is available

4 months back could be version 2

it is showing 2.67 to me for update(package manager)

by user 546555823451668481


I updated but somehow now the npm is not starting nor the local server

by user 546555823451668481

Installing Needle/CollaborativeSandbox
CMD=“npm install --install-links=false --progress=false --no-audit --no-fund”
at: R:\gitHub\website 4\Needle\CollaborativeSandbox

at void UnityEngine.Debug.Log(object message)
Task Needle.Engine.Actions.BeginInstall(string installCommand, string path, bool showWindow) in

by user 546555823451668481

also in scene window it gives a message saying failed to laod server

by user 546555823451668481

Do you have any other messages? Perhaps check with the release notes when v3 was initially released to make sure your project is setup correctly (you might want to restart unity too)

Or Release 3.1.0-exp · needle-tools/needle-engine-support · GitHub