protected internal virtual Scriptable GetClassPrototype() { object protoVal = GetPrototypeProperty(); if (protoVal is Scriptable) { return (Scriptable)protoVal; } return ScriptableObject.GetObjectPrototype(this); }