Skip to main content
100%

Gist 1973ba4fdee5e215ecb28f0db7f0aadb

✓ Published0🌍 Public
Aandybak
Last edited Aug 29, 2019
Created on Aug 29, 2019

This example shows a Unity Editor tool that automatically grants internal access to Shader Graph’s assembly during compilation. It hooks into `CompilationPipeline.assemblyCompilationStarted` to detect when the `Unity.ShaderGraph.Editor` assembly is being compiled, then locates its `AssemblyInfo.cs` file and appends an `InternalsVisibleTo` attribute referencing `BovineLabs.Vision.Editor`. The code uses `File.ReadAllLines`, `File.AppendAllText`, and `File.SetAttributes` to modify the file, while skipping the modification if the attribute already exists.

AI-generated description

Similar vizzes