File size: 867 Bytes
18a519f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Collections.Generic;

namespace Unity.VisualScripting
{
    [Analyser(typeof(INesterState))]
    public class NesterStateAnalyser<TNesterState> : StateAnalyser<TNesterState>
        where TNesterState : class, INesterState
    {
        public NesterStateAnalyser(GraphReference reference, TNesterState state) : base(reference, state) { }

        protected override IEnumerable<Warning> Warnings()
        {
            foreach (var baseWarning in base.Warnings())
            {
                yield return baseWarning;
            }

            if (state.childGraph == null)
            {
                yield return Warning.Caution("Missing nested graph.");
            }

            if (state.nest.hasBackgroundEmbed)
            {
                yield return Warning.Caution("Background embed graph detected.");
            }
        }
    }
}