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

MoveItIntegration plugin - settings are not copy-pasted on segment clone with MoveIt #1300

Closed
krzychu124 opened this issue Jan 22, 2022 · 2 comments · Fixed by #1303
Closed
Assignees
Labels
Asset Editor Issue related to TM:PE support in content editors BUG Defect detected high priority Affects lots of users regression old bug comes back or a new bug introduced in code that used to work.
Milestone

Comments

@krzychu124
Copy link
Member

Describe the problem

Some TM:PE Settings are lost/ignored after copy&paste with MoveIt, looks like data is transferred so it should correctly save data in Asset Editor as AssetSerialization thingy uses the same code.

Steps to reproduce

  1. Add few segments
  2. Setup some TM:PE settings (lane arrows, speed limits, junction restrictions, priority signs)
  3. Select and copy segments with TMPE settings, observer result

image

Transferred:

  • Lane connections,
  • Vehicle restrictions,
  • Parking restrictions,

image

Not transferred:

  • Lane arrows (not transferred, not recalculated based on lane connections),
  • Speed limits (theoretically something is transferred when logging transfer data but also not applied),
  • Junction restrictions (looks like returns false at some point during validation when transferring settings to new segments),
  • Priority signs (not sure yet, might be similar to junction restrictions),

I've prepared dirty hack (few C# reflection lines) to force MoveIt to fetch again integration plugins after hot-reload since it was using older version which resulted in lots of null refs -> accessing destroyed instances via static methods.

Integration plugin was referencing static field of specific Assembly version so it has access to nullified static field value from before hot reload since the old Assembly still exist in memory!

@krzychu124 krzychu124 added BUG Defect detected high priority Affects lots of users Asset Editor Issue related to TM:PE support in content editors regression old bug comes back or a new bug introduced in code that used to work. labels Jan 22, 2022
@krzychu124 krzychu124 added this to the 11.6.4 milestone Jan 22, 2022
@krzychu124 krzychu124 self-assigned this Jan 22, 2022
@krzychu124 krzychu124 added the investigating Issue currently under investigation label Jan 22, 2022
@krzychu124
Copy link
Member Author

I've added few logging points to see what is going on:
Notable entries from the log (paste selected segments with MoveIt):

Call:

SegmentEndTransferring.. segmentID: 15444, newSegmentId: 12230, prioSign: Yield,

Result:

TrafficPriorityManager.MayNodeHavePrioritySigns: nodeId=21297, result=false, reason=NoJunction TrafficPriorityManager.MaySegmentHavePrioritySign: segmentId=12230, startNode=True, result=false, reason=NoJunction

Call:

SegmentEndTransferring.. segmentID: 15444, newSegmentId: 5380, uturn: True,

Result:

JunctionRestrictionsManager.IsUturnAllowedConfigurable(5380, True): ret=False, flags=Created, OnGround, CustomTrafficLights, service=Road, seg.oneWay=False

@kianzarrin Is that a design issue of MoveIt Integration that it start processing (paste) recordables when segments/nodes are not fully initialized yet?

@krzychu124
Copy link
Member Author

Ok... MoveIt is creating nodes in Simulation Action which is correct, but the game is doing only half work, rest is done in the next simulation step (by adding new node to NetManager.m_updatedNodes queue).
The easiest workaround would be to Apply records on the next simulation step... I need to build something for that.
@kianzarrin ideas how to do this? Do you have working solution in one of your other mods?

@krzychu124 krzychu124 removed the investigating Issue currently under investigation label Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Asset Editor Issue related to TM:PE support in content editors BUG Defect detected high priority Affects lots of users regression old bug comes back or a new bug introduced in code that used to work.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant