Browse Source

Merge pull request #1536 from julien-moreau/master

Now serialize material name
David Catuhe 8 years ago
parent
commit
fbcc3550d3
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/Materials/babylon.material.ts

+ 5 - 1
src/Materials/babylon.material.ts

@@ -99,6 +99,9 @@
         public id: string;
 
         @serialize()
+        public name: string;
+
+        @serialize()
         public checkReadyOnEveryCall = false;
 
         @serialize()
@@ -206,7 +209,8 @@
         private _cachedDepthWriteState: boolean;
 
 
-        constructor(public name: string, scene: Scene, doNotAdd?: boolean) {
+        constructor(name: string, scene: Scene, doNotAdd?: boolean) {
+            this.name = name;
             this.id = name;
 
             this._scene = scene;