Example #1
0
        public override void OnImportAsset(AssetImportContext ctx)
        {
            GetAbsoluteAssetPath(ctx);
            OpenVDBPoints points = new OpenVDBPoints(absoluteAssetPath);

            points.Load();
            uint count = points.Count;

            Debug.Log(string.Format("Total Points: {0}", count.ToString()));
        }
 public override void OnImportAsset(AssetImportContext ctx)
 {
     try
     {
         GetAbsoluteAssetPath(ctx);
         string outPath = string.Format("{0}/{1}.vdb", Application.dataPath, Path.GetFileNameWithoutExtension(ctx.assetPath));
         if (!File.Exists(outPath))
         {
             OpenVDBPoints.ConvertPLYToVDB(absoluteAssetPath, outPath);
         }
     }
     catch (System.Exception e)
     {
         Debug.Log(e);
     }
 }