File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 241241 " }"
242242 ],
243243 "description" : " Create a Unity DOTS Job"
244+ },
245+ "Dots Create Baker" : {
246+ "prefix" : " dcb" ,
247+ "body" : [
248+ " using UnityEngine;" ,
249+ " using Unity.Entities;" ,
250+ " " ,
251+ " namespace ${1}" ,
252+ " {" ,
253+ " \t public class ${2:$TM_FILENAME_BASE} : MonoBehaviour" ,
254+ " \t {" ,
255+ " \t\t public ${3:float} ${4:variable};${0}" ,
256+ " \t }" ,
257+ " " ,
258+ " \t public class ${5:Component}Baker : Baker<${2:$TM_FILENAME_BASE}>" ,
259+ " \t {" ,
260+ " \t\t public override void Bake(${2:$TM_FILENAME_BASE} authoring)" ,
261+ " \t\t {" ,
262+ " \t\t\t var entity = GetEntity(TransformUsageFlags.Dynamic);" ,
263+ " \t\t\t AddComponent(entity, new ${5:Component}" ,
264+ " \t\t\t {" ,
265+ " \t\t\t\t ${6:ComponentVariable} = authoring.${4:variable}" ,
266+ " \t\t\t });" ,
267+ " \t\t }" ,
268+ " \t }" ,
269+ " }"
270+ ],
271+ "description" : " Create a Unity DOTS component baker & its authoring monobehavior class"
244272 }
245273}
You can’t perform that action at this time.
0 commit comments