Class SmartObjects
Represents a list of objects to be used as a value argument to Smart.Format
.
With SmartObjects
- all objects used for Smart.Format can be collected in one place as the first argument
- the format string can be written like each object would be the first argument of Smart.Format
- there is no need to bother from which argument a value should come from
Namespace: UnityEngine.Localization.SmartFormat
Syntax
public class SmartObjects : List<object>, IList<object>, ICollection<object>, IEnumerable<object>, IList, ICollection, IEnumerable
Remarks
In case more than one object has the same member (or key) name, the value of the first object in the list will prevail. Change the order of objects in the list to change the object priority.
Constructors
SmartObjects()
Initializes a new instance of the SmartObjects
class.
Declaration
public SmartObjects()
SmartObjects(IEnumerable<Object>)
Initializes a new instance of the SmartObjects
class that contains elements copied from the specified collection.
Declaration
public SmartObjects(IEnumerable<object> objList)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Object> | objList | The collection whose elements are copied to the new list. |
Methods
Add(Object)
Adds an object to the end of list.
Declaration
public void Add(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Any object except types of SmartSource |
AddRange(IEnumerable<Object>)
Adds the elements of the specified collection to the end of the list.
Declaration
public void AddRange(IEnumerable<object> objList)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Object> | objList | Any list of objects except objects of type SmartSource |