Esempio n. 1
0
            public void AddProperty(UProperty property, string bpVarName, bool exportable)
            {
                // If the ScriptName metadata is set use that for the property name instead
                string scriptName = property.GetMetaData(MDProp.ScriptName);

                if (!string.IsNullOrEmpty(scriptName))
                {
                    bpVarName = scriptName;
                }

                allProperties.Add(property, bpVarName);

                if (exportable)
                {
                    exportableProperties.Add(property, bpVarName);
                    if (IsBlittable && (!codeGenerator.IsBlittablePropertyType(property) || property.IsFixedSizeArray))
                    {
                        IsBlittable = false;
                    }
                }
                else
                {
                    nonExportableProperties.Add(property, bpVarName);

                    // This property isn't being exported, our struct size wont match the real struct size
                    IsBlittable = false;
                }
            }