title: Resources.Load returning null in Editor scripting
body: <p>I've been trying to implement a simple Resources.Load call in an editor script i'm making, but it continues to return null despite the numerous different approaches I've tried.</p>
  
  <p><strong>Purpose</strong></p>
  
  <ul>
  <li><p>User adds .jpg's to a folder in the project, in this case Assets/Resources/360Photos</p>
  
  <ul>
  <li><p>Postprocess script detects this file, applies cubemap texture import settings to it</p></li>
  <li><p>Script will then create a skybox/cubemap material and apply the texture to the material</p></li>
  </ul></li>
  </ul>
  
  <p>The roadblock I have hit is getting the texture object after it has been post processed as a cubemap, and how it would then be applied to the _Tex property of a Skybox/Cubemap shaded material, as I can't seem to even load the resource associated with the texture I import and process to a cubemap.</p>
  
  <p>Is it possible to use Resources.Load in Unity Editor Scripting (AssetPostProcessor in particular) or am I trying to perform functionality that is only available at runtime?</p>
  
  <p>If somebody could look over my code, and view the Unity screenshot I have provided, that would be much appreciated.</p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  using UnityEditor;
  
  public class Postprocess360Photo : AssetPostprocessor {
  
  void OnPostprocessTexture(Texture2D texture)
  {
      string lowerCaseAssetPath = assetPath.ToLower ();
      bool isIn360PhotoDirectory = lowerCaseAssetPath.IndexOf ("360photos") != -1;
  
      if (isIn360PhotoDirectory) 
      {
          TextureImporter textureImporter = (TextureImporter)assetImporter;
          textureImporter.textureType = TextureImporterType.Default;
          textureImporter.textureShape = TextureImporterShape.TextureCube;
          textureImporter.generateCubemap = TextureImporterGenerateCubemap.Cylindrical;
          textureImporter.sRGBTexture = true;
          textureImporter.alphaSource = TextureImporterAlphaSource.FromInput;
          textureImporter.alphaIsTransparency = true;
          textureImporter.npotScale = TextureImporterNPOTScale.ToSmaller;
          textureImporter.isReadable = true;
          textureImporter.mipmapEnabled = false;
          textureImporter.wrapMode = TextureWrapMode.Clamp;
          textureImporter.filterMode = FilterMode.Bilinear;
      }
  
      AssetDatabase.ImportAsset (assetPath);
      CreateMaterial ();
  }
  
  void CreateMaterial ()
  {
      Cubemap cubemap = (Cubemap)Resources.Load ("360Photos/FrontDriveway");
      Debug.Log (cubemap);
  }
  }
  </code></pre>
  
  <p>Please see image for hierarchy structure and console verification of a null return value:-</p>
  
  <p><a href="https://imgur.com/a/ruNhc" rel="nofollow noreferrer">http://imgur.com/a/ruNhc</a></p>
  
  <p>Using Unity 5.5.0f3 if that helps.</p>