Example #1
0
        public virtual void ValidateViewMeshes()
        {
            if (decomp_valid)
            {
                return;
            }

            fMesh unityMesh = UnityUtil.DMeshToUnityMesh(mesh, false, true);

            viewMeshGO = GameObjectFactory.CreateMeshGO("component", unityMesh, false, true);
            viewMeshGO.SetMaterial(SourceSO.CurrentMaterial, true);
            viewMeshGO.SetLayer(SourceSO.RootGameObject.GetLayer());
            if (SourceSO.ShadowsEnabled == false)
            {
                MaterialUtil.DisableShadows(viewMeshGO, true, true);
            }
            SourceSO.AppendNewGO(viewMeshGO, SourceSO.RootGameObject, false);

            decomp_valid = true;
        }
Example #2
0
 public fMesh(DMesh3 source)
 {
     mesh = UnityUtil.DMeshToUnityMesh(source, false);
 }