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

Fix duplicate agent creation when reactivating scene #47

Merged
merged 8 commits into from
Apr 25, 2024

Conversation

nowsprinting
Copy link
Contributor

@nowsprinting nowsprinting commented Apr 20, 2024

Fixed two bugs.

Fix duplicate agent creation when reactivating scene

Problem

Duplicate agent creation.

Conditions

  1. Load and activate scene-A, creation agent-A
  2. Load scene-B additive and activate (scene-A and agent-A remain)
  3. Re-activate scene-A

Cause

Agent creation when SceneManager.activeSceneChanged.

Fix

Agent creation when SceneManager.sceneLoaded.

Fix not dispatch observer agent case

Problem

Not dispatch (creation) observer agent.

Conditions

Specify observer agent, but not specify fallback agent.

Cause

Return before creating observer agent when not specified fallback agent.

Fix

Create observer agent even if fallback agent is not specified.


Contribution License Agreement

@nowsprinting nowsprinting requested a review from a team as a code owner April 20, 2024 17:16
@github-actions github-actions bot added the fix label Apr 20, 2024
@nowsprinting nowsprinting changed the title Fix/duplicate agents Fix duplicate agent creation when reactivating scene Apr 20, 2024
Runtime/AgentDispatcher.cs Outdated Show resolved Hide resolved
Runtime/AgentDispatcher.cs Show resolved Hide resolved
@nowsprinting nowsprinting requested a review from Kuniwak April 22, 2024 06:44
@nowsprinting nowsprinting requested a review from Kuniwak April 22, 2024 22:07
Copy link
Member

@Kuniwak Kuniwak left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@Kuniwak Kuniwak merged commit 0bce2a3 into DeNA:master Apr 25, 2024
1 check passed
@nowsprinting nowsprinting deleted the fix/duplicate_agents branch April 25, 2024 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants