
The part names used in your model must of course observe RW's conventional 1_0500_objectname format. Beyond that, they can be anything you want with one exception, or rather two, those being the flasher lights. There must be two separate flasher parts, left and right, and in the "objectname" field they must be named "lc_lightsleft" and "lc_lightsright" respectively. The signals and gates are controlled by a LUA script. If you use a copy of the default script, and there's no reason not to, these part names match the names assigned to the variables NODE_CLOSED LEFT and NODE_CLOSED_RIGHT in the script.
Here are recommendations regarding frame animation.
Gates: A real-world gate usually takes 4 or more seconds to lower or raise, so set the animation up for at least 120 frames (4 x 30 fps). Strange as it may seem, at frame 0 the gate should be in the down (horizontal) position. Make this a key frame. Make another key frame at frame 120 and rotate the gate up to the raised position. Done! Just for fun, you might also want to try adding a little "bounce" when the gate reaches the limit of its rotation.
Flashers: The traditional way to animate signal flashers is to use two "lit" light objects, one for the left light and one for the right light, and animate them in reciprocating fashion. RailWorks uses a completely different approach. You don't animate them at all! In fact your signal can be a simple static scenery object. As long as there are separate left and right flashers and they have the part names noted above, it will work. Make the flashers so they are in the "lit" position -- that is, in front of the "dark" artwork. If you have two-directional flashers, the type with separate lamp housings that face the road in both directions, make sure the lights are visible in both directions. Here's a top view of what it should look like.

RailWorks takes care of turning the light objects on and off in response to the current state of variables in the LUA script. The game software renders a light when it's ON and doesn't render the light at all when it's OFF. The rate at which the flashers are cycled on and off is also controlled by the LUA script using the variable WARN_LIGHT_FLASH_SECS. In the US, this is usually about 1.0 second.
Export the gate and signal models as IGS files and export the animated parts of the gate as an IA file. In the Blueprint editor, create an Animated Procedural Scenery blueprint for the gate. In the Anim set section, create an Animation (not Auto Animation) sub-blueprint. In the Animation ID field, you must enter "open" (without the quotes) for the gate. Here again, the Animation ID name for gates matches the name assigned to the variables ANIM_OPEN and ANIM_closed in the LUA script. As previously noted, the flasher signal can be a simple scenery object since it has no animated parts.
Now we'll tie everything together by filling out a Level Crossing blueprint, which is something new in RW2. For a complete crossing setup consisting of two gates and two signals, you'll need to define four children in the Container component sub-blueprint, that is, two gate children and two signal children. In the Child name field, call the gates "Barrier1" and "Barrier2" and call the signals "Warning1" and "Warning2" (without the quotes). Other names are permitted as long as they are the same ones used in the LUA script.
In the Script component BP field, copy-paste the name of the LUA script. The default one is called lc_us.lua and you can find it in the LevelCrossings folder under RailSimulatorUS. I made a copy of it and placed it among the other files in my Source folder. I used it as is except for the following minor edits. Open your copy of the LUA file using Notepad and find these lines:
-- Trigger distances
WARN_DISTANCE = 800.0
CLOSE_DISTANCE = 550.0
PASS_DISTANCE = -100.0
Adjust the WARN_DISTANCE variable to suit the usual speed of trains that use the crossing, higher for high-speed passenger trains, lower for slow freights. I changed the CLOSE_DISTANCE variable to be only 50 less than the WARN_DISTANCE so the gates begin to close shortly after the lights begin to flash. I also changed the PASS_DISTANCE to -10.0 so the whole cycle ends a few seconds after the train clears the crossing. As I previously mentioned, I also changed the value of WARN_LIGHT_FLASH_SECS to 1.0.
The Geometry ID field of the Level Crossing blueprint can be a problem. This is where you specify the placement gizmo, the little gray box that you first set on the crossing. One of these days RS.com may supply the source files for this item, but in the meantime you'll have to use your own gizmo. Just make a small box, texture it and export in the usual way. Now you'll be able to look at the composite grade crossing object in the Preview window. You can drag the four gate and signal components to positions and orientations that are reasonably close to where you'll eventually want them. That procedure places a set of transform-matrix coordinates in your XML and BIN files. Export again to retain these coordinates. You don't have to do this, but if you don't all the child objects will initially be sitting on top of one another in the World Editor, making it slightly more difficult to adjust them to their final positions.
At this point everything should be in place for you to install your own custom grade crossing object!
Some final notes about audio. The Level Crossing blueprint for the default US object, lc_us.bin, has a fifth child, referencing the audio controls for the looped bell sound and the one-shot gate motor sound. I'm not sure if this works or not. At first it worked for me, but for some reason now it doesn't. Anyway, you might want to try adding audio to your own custom object. Creation of audio files is a complex topic for another time. If you've never delved into the subject before, I recommend you read the Wiki article, as well as the outline tutorial on my web site. You should also inspect the relevant audio blueprints (Amb_P_US_LevelCrossingSound.bin and Amb_P_US_LevelCrossing.proxybin), to see how things should look. For extra credit, try and make this work!