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

SpeedLimits stage 1: U interface and texture loading changed #1044

Merged
merged 3 commits into from
Jan 31, 2021

Conversation

kvakvs
Copy link
Collaborator

@kvakvs kvakvs commented Dec 22, 2020

  • Texture and texture-atlas loading changed: now you can define desired texture size
  • RoadDefaults textures commented out will be added and loaded in the following update

Copy link
Member

@krzychu124 krzychu124 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

UITextureAtlas foundAtlas = TextureUtil.FindAtlas(fullName);

// If is NOT the same as UI default, means the atlas is already loaded (return cached)
if (!System.Object.ReferenceEquals(foundAtlas, UIView.GetAView().defaultAtlas)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can understand that there is the issue of confusing this with unity object but if you simply use object. that would work too.
Just a side note. no need to fix.

@kianzarrin
Copy link
Collaborator

Window has opacity but components have transparency ... a bit inconsistent. I understand fixing this might need a lot of code changes and might be out of the scope of this review. so no pressure.
image

@kianzarrin
Copy link
Collaborator

kianzarrin commented Jan 29, 2021

I have selected the parking tool. but no parking overlay
image
EDIT: once I rotate the screen the parking overlay reappears
image

This is sometimes reproducible and sometimes not. So for example:

  • switch to speed tool -> switch to parking tool -> parking sprites are visible
  • switch to Vehicle restriction tool -> exit Vehicle restriction tool -> switch to parking tool -> parking sprites not visible until I rotate the screen.

Copy link
Collaborator

@kianzarrin kianzarrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krzychu124
Copy link
Member

I have selected the parking tool. but no parking overlay
image
EDIT: once I rotate the screen the parking overlay reappears
image

This is sometimes reproducible and sometimes not. So for example:

  • switch to speed tool -> switch to parking tool -> parking sprites are visible
  • switch to Vehicle restriction tool -> exit Vehicle restriction tool -> switch to parking tool -> parking sprites not visible until I rotate the screen.

Pretty old bug, introduced with camera position caching mechanism.

@kvakvs
Copy link
Collaborator Author

kvakvs commented Jan 29, 2021

@kianzarrin For opacity/transparency, the work you mentioned is already done. I store the opacity/transparency in the same float value, in a struct. Its probably the UI inconsistency here?
@krzychu124 The bug is not introduced in this branch? Happy to fix it, but not all problems at once :)

Copy link
Collaborator

@kianzarrin kianzarrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case looks good to me

@krzychu124
Copy link
Member

@kvakvs I think it was introduced when you've added camera transform cache thingy to speed up rendering of overlays long time ago. If you don't move camera and switch tool with overlays they won't show up until you move it a little bit

@kvakvs
Copy link
Collaborator Author

kvakvs commented Jan 30, 2021

I am slowly refactoring overlays into separate modules one per tool.
Can have this as a TODO item in the final Pull request for Speed Limits if its urgent, or as some high prio bug to do after it

@krzychu124
Copy link
Member

krzychu124 commented Jan 30, 2021

Yeah I'm waiting for speed limits refactor to begin some work on performance improvements. I plan to improve TM:PE to be able to run it with Unity profiler. I'm not sure yet what changes are necessary to make it work and not crash at start

[EDIT]
You can merge it if that's all for this PR

@kvakvs kvakvs changed the title Preparations for SpeedLimits: U interface and texture loading changed SpeedLimits stage 1: U interface and texture loading changed Jan 31, 2021
@kvakvs kvakvs merged commit aac2e4d into CitiesSkylinesMods:master Jan 31, 2021
@originalfoo originalfoo added this to the 11.6.0 milestone Jan 18, 2022
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

Successfully merging this pull request may close these issues.

4 participants