User Tools

Site Tools


xfur_mobile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
xfur_mobile [2019/08/10 18:01]
irrsoft [XFur Painter]
xfur_mobile [2019/08/10 18:17]
irrsoft [XFur Mobile API]
Line 490: Line 490:
 ### ###
 ### ###
-All XFur classes are contained within the XFurStudio namespace. To call any function from the XFur system or any of its components, you must write using XFurStudio at the top of your C# script.+All XFur classes are contained within the XFurStudio namespace. To call any function from the XFur system or any of its components, you must write **using XFurStudioMobile** at the top of your C# script.
 ### ###
 ### ###
Line 496: Line 496:
 ### ###
 \\ \\
-{{ :xfursystemcodeaccess.png?direct&600 |}}+{{ :xfursystemcodeaccess.png?direct |}}
 \\ \\
 +###
 +Where gameObject is the target object from which you want to access the XFur_System component.
 +###
 +###
 +To access the fur properties of any of the materials, you use the FurProfiles interface and the index of the fur material you want to edit. After this, if you have auto-complete enabled on your coding IDE, you should see all the available methods and variables with a small explanation of what they do : 
 +###
 +
 +\\
 +{{ :furdata.png?direct |}}
 +\\
 +
 +###
 +Any function that does not have a description should not be called by your scripts, as they are most surely intended for internal use only. Do not call nor use any internal function unless you are sure of what you are doing.
 +###
 +###
 +The main functions that you can call from other scripts and that you may need at some point in the development of your project are the following : 
 +###
 +
 +###
 +**On XFurMobile_System.cs : **
 +###
 +
 +\\
 +{{ :loadxfurprofileasset.png?direct |}}
 +\\
 +
 +###
 +This function lets you assign a fur profile (profile) to the XFur system manually, to the specified fur material (material Index). This is useful if, for example, you are allowing your players to customize their characters and need to let them choose among a series of fur patterns. Simply assign the profile that corresponds to the choice of the player, and load it with this function to make the system load all the fur properties.
 +###
 +
 +\\
 +{{ :applyfur_properties.png?direct |}}
 +\\
 +
 +###
 +Forces all materials (or the specific material with index equals to profileIndex) to update and apply any changes that you have made. 
 +###
 +
 +###
 +**WARNING : Once an XFur System component is added to an object, it will override and take control over the Materials array of said object's renderer. If you want to swap the materials of the object at runtime through code you need to override both the original material from the corresponding XFur material profile (this step is optional on Unity 2018.3+) and the material itself on the sharedMaterials array of the renderer :**
 +###
 +
 +\\
 +{{ :materials_switch.png?direct |}}
 +\\
 +
 +###
 +**Do not swap a XFur material for another XFur material. Use Fur Profile Assets instead.**
 +###
 +
xfur_mobile.txt · Last modified: 2020/08/25 04:18 by irrsoft