Jump to content

Tags and prefabs


Alienhead
 Share

Go to solution Solved by Josh,

Recommended Posts

To take this one step further, loading a prefab unto the map, giving it a TAG then saving the map then exit the editor - reload the editor- reload the map and the TAG is gone.

 

I'm only happy when I'm coding, I'm only coding when I'm happy.

Link to comment
Share on other sites

This bug still occurs, I can now import a model straight onto the map, give it a tag - save the map, run the map file and the code does not recongize  the model as having a tag, If I load the map file back up into the editor the flag is completely gone. 

I'm only happy when I'm coding, I'm only coding when I'm happy.

Link to comment
Share on other sites

Tags are being saved in the map file, and if I load the prefab like a map (File > Open) the tags load, but when objects are placed in the scene the tags are missing.

{
	"scene": {
		"entities": [
			{
				"castshadows": true,
				"collisiontype": 1,
				"extras": {},
				"friction": [
					0.5,
					0.8999999761581421
				],
				"group": "1663675869920",
				"kids": [
					{
						"castshadows": true,
						"collisiontype": 1,
						"extras": {},
						"friction": [
							0.5,
							0.8999999761581421
						],
						"matrix": [
							"0x42c80000",
							"0x0",
							"0x0",
							"0x0",
							"0x0",
							"0xb747ffff",
							"0x42c7fffe",
							"0x0",
							"0x0",
							"0xc2c7fffe",
							"0xb747ffff",
							"0x0",
							"0x0",
							"0x0",
							"0x0",
							"0x3f800000"
						],
						"model": {
							"islimb": true
						},
						"name": "Cube",
						"physicsmode": 0,
						"pickmode": 1,
						"quaternion": [
							"0x3f3504f4",
							"0x0",
							"0x0",
							"0xbf3504f2"
						],
						"reflection": true,
						"rotation": [
							"0x42b3f5df",
							"0x80000000",
							"0x0"
						],
						"scale": [
							"0x42c80000",
							"0x42c7ffff",
							"0x42c7ffff"
						],
						"tags": [
							"test2"
						],
						"uuid": "d0a578c6-4ac8-4de5-83e0-85db59a8a57b"
					}
				],
				"model": {
					"islimb": false,
					"path": "Models/test.mdl"
				},
				"name": "STATIC_MESH",
				"physicsmode": 0,
				"pickmode": 1,
				"reflection": true,
				"tags": [
					"test1"
				],
				"uuid": "bc1b377d-116b-45d8-b6dd-5eb8f8330079"
			}
		]
	}
}

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • Solution

Okay, the problem is that Entity::Copy() was not copying the tags. I believe this will be fixed in the next build that goes up.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...