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 for older Unity #24

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Runtime/Reporters/SlackReporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public override async UniTask PostReportAsync(
// NOTE: In _sender.send, switch the execution thread to the main thread, so UniTask.WhenAll is meaningless.
foreach (var slackChannel in (string.IsNullOrEmpty(settings.slackChannels)
? slackChannels
: settings.slackChannels).Split(","))
: settings.slackChannels).Split(','))
{
if (cancellationToken.IsCancellationRequested)
{
Expand All @@ -59,7 +59,7 @@ public override async UniTask PostReportAsync(
await _sender.Send(
string.IsNullOrEmpty(settings.slackToken) ? slackToken : settings.slackToken,
slackChannel,
mentionSubTeamIDs.Split(","),
mentionSubTeamIDs.Split(','),
addHereInSlackMessage,
logString,
stackTrace,
Expand Down
3 changes: 2 additions & 1 deletion Tests/Runtime/TestDoubles/StubClickAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using DeNA.Anjin.Agents;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;

namespace DeNA.Anjin.TestDoubles
{
Expand All @@ -23,7 +24,7 @@ public class StubClickAgent : AbstractAgent
/// <inheritdoc />
public override UniTask Run(CancellationToken token)
{
foreach (var obj in FindObjectsByType<GameObject>(FindObjectsSortMode.None))
foreach (var obj in SceneManager.GetActiveScene().GetRootGameObjects())
{
if (obj.name != targetName)
{
Expand Down