Skip to content

Commit

Permalink
Merge pull request #24 from nowsprinting/fix/support_older_unity
Browse files Browse the repository at this point in the history
Fix for older Unity
  • Loading branch information
Kuniwak authored Nov 22, 2023
2 parents 12b5c33 + 1be01ed commit aee9e5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit aee9e5f

Please sign in to comment.