From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/BaseClasses/NamedObject.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Runtime/BaseClasses/NamedObject.h (limited to 'Runtime/BaseClasses/NamedObject.h') diff --git a/Runtime/BaseClasses/NamedObject.h b/Runtime/BaseClasses/NamedObject.h new file mode 100644 index 0000000..7355dbc --- /dev/null +++ b/Runtime/BaseClasses/NamedObject.h @@ -0,0 +1,23 @@ +#ifndef NAMEDOBJECT_H +#define NAMEDOBJECT_H + +#include "EditorExtension.h" +#include "Runtime/Containers/ConstantString.h" + +class EXPORT_COREMODULE NamedObject : public EditorExtension +{ + public: + + virtual char const* GetName () const { return m_Name.c_str (); } + virtual void SetName (char const* name); + + REGISTER_DERIVED_ABSTRACT_CLASS (NamedObject, EditorExtension) + DECLARE_OBJECT_SERIALIZE (NamedObject) + + NamedObject (MemLabelId label, ObjectCreationMode mode); + protected: + + ConstantString m_Name; +}; + +#endif -- cgit v1.1-26-g67d0