public PipeType(params CodeType[] types) : base(GetName(types)) { IncludedTypes = types; Operations = new PipeTypeOperatorInfo(this); _scope = new Lazy <Scope>(() => { Scope scope = new Scope() { TagPlayerVariables = true }; // Get all the scopes of the included types and generate the scope name. string scopeName = string.Empty; for (int i = 0; i < IncludedTypes.Length; i++) { // Get the current type's scope. Scope typeScope = IncludedTypes[i].GetObjectScope(); if (typeScope != null) { // Cope the elements. scope.CopyAll(typeScope); // Append to the scope name. scopeName += "'" + typeScope.ErrorName + "'"; if (i < IncludedTypes.Length - 1) { scopeName += ", "; } } } // Set the scope's name. scope.ErrorName = scopeName; return(scope); }); }