//Alex: I don't know what calls this. I also don't know what it does. //Tyler: This is the actual method Unity calls where we create the asset after the naming operation is done. public override void Action(int instanceId, string pathName, string resourceFile) { //Alex: we store an instance of our cheese pipeline asset into instance FPRenderPipelineAsset instance = CreateInstance <FPRenderPipelineAsset>(); //Alex: we default the color to black instance.Color = Color.black; //Alex: I don't know what this paths to. AssetDatabase.CreateAsset(instance, pathName); //Alex: this MIGHT be updating the project folder?????? //Tyler: This just highlights the asset after it was created. Useful since it might move in the view due to ABC sorting. ProjectWindowUtil.ShowCreatedAsset(instance); }
//Alex: Consturctor that gets a reference to an asset passed in. //Tyler: Constructor that gets only the creating asset reference passed in. public FPRenderPipeline(FPRenderPipelineAsset FPPipelineAsset) { //Alex: Store a pointer to the asset //Tyler: Initialize the asset reference with no null checking. AssetReference = FPPipelineAsset; //Alex: shouldn't be null #if UNITY_EDITOR SupportedRenderingFeatures.active = new SupportedRenderingFeatures() { defaultMixedLightingMode = SupportedRenderingFeatures.LightmapMixedBakeMode.None, reflectionProbeSupportFlags = SupportedRenderingFeatures.ReflectionProbeSupportFlags.None, rendererSupportsLightProbeProxyVolumes = false, //will be true later rendererSupportsMotionVectors = false, //will be true later rendererSupportsReceiveShadows = false, //will be true later rendererSupportsReflectionProbes = false, //will be true later supportedLightmapBakeTypes = 0, supportedLightmapsModes = LightmapsMode.NonDirectional, supportedMixedLightingModes = SupportedRenderingFeatures.LightmapMixedBakeMode.None,//indirect only later }; #endif }